(1)jdk不匹配(或不存在) 
    项目指定的jdk为“jdk1.6.0_18”,而当前eclipse使用的是“jdk1.6.0_22”。需要在BuildPath | Libraries,中做简单调整。 
    (2)jar包缺失或冲突 
    当找不到“XX”所在的jar包时,会报这个错。解决只需要找到(ctrl+点击,可能能看到jar包名称)对应jar包导入项目即可。 
    另外,出现相同的XX时也会报此错。可能需要调包、解包、选删。 
    (3)eclipse查找项目类型策略所致

eclipse下,上述两条都对比过了,没有任何问题,可偏偏还报这错。这时,需要操作一下 Project > Clean... ,问题即可解决。原因是,机制所致。因为某些特殊原因,eclipse没能自动编译源代码到build/classes(或其他classes目录),导致类型查找不到

xxx cannot be resolved to a type 错误解决方法的更多相关文章

  1. javax.servlet.ServletException cannot be resolved to a type错误解决方法

    在页面中使用全局路径时${pageContext.request.contextPath}出现javax.servlet.ServletException cannot be resolved to ...

  2. cannot be resolved to a type 错误解决方法

    引言:  eclipse新导入的项目经常可以看到“XX cannot be resolved to a type”的报错信息.本文将做以简单总结. 正文:      (1)jdk不匹配(或不存在)   ...

  3. “cannot be resolved to a type” 错误解决方法

    (1)jdk不匹配(或不存在) 项目指定的jdk为“jdk1.6.0_18”,而当前eclipse使用的是“jdk1.6.0_22”.需要在BuildPath | Libraries,中做简单调整. ...

  4. Eclipse javax.servlet.jsp.PageContext cannot be resolved to a type 错误解决办法

    不要 直接将jsp-api.jar拷贝到lib目录下,而是通过外部jar包引用.项目 右键->Properties->Libraries->Add External JARS-选择 ...

  5. eclipse中编译时enum出现cannot be resolved to a type错误

    eclipse中编译时enum出现cannot be resolved to a type错误 通常是因为eclise使用的jdk版本的问题...默认是使用的是jdk1.5 应该去选择成jdk1.6或 ...

  6. maven项目报错xxx cannot be resolved to a type

    同一个maven项目下的不同模块,无法导入其他模块的类,其他模块的所有类都报xxx cannot be resolved to a type 解决方案(参考): 项目Build Path --> ...

  7. error: variable '__this_module' has initializer but incomplete type错误解决

    版权所有,转载必须说明转自 http://my.csdn.net/weiqing1981127 原创作者:南京邮电大学  通信与信息系统专业 研二 魏清 问题描述:使用SAM9X25  内核版本是2. ...

  8. Linux遇到的问题(一)Ubuntu报“xxx is not in the sudoers file.This incident will be reported” 错误解决方法

    提示错误信息 www@iZ236j3sofdZ:~$ ifconfig Command 'ifconfig' is available in '/sbin/ifconfig' The command ...

  9. xxx was built without full bitcode" 编译错误解决

    xxx was built without full bitcode" 编译错误解决 iOS 打包上线 All object files and libraries for bitcode ...

随机推荐

  1. URL编码方法比较

    javascript中存在几种对URL字符串进行编码的方法:escape(),encodeURI(),以及encodeURIComponent().这几种编码所起的作用各不相同. escape() 方 ...

  2. JDK各个版本下载页面

    http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html 需 ...

  3. SGU 107

    107. 987654321 problem time limit per test: 0.25 sec. memory limit per test: 4096 KB For given numbe ...

  4. mvc5 _ViewStart.cshtml 模板页如何定义

    1._Viewstart.cshtml是一个在呈现View文件的时候的启动文件,会在所有View(.cshtml)被执行之前执行,主要用于一些不方便或不能在母版(_Layout.cshtml)中进行的 ...

  5. UVA 10497 - Sweet Child Makes Trouble 高精度DP

    Children are always sweet but they can sometimes make you feel bitter. In this problem, you will see ...

  6. 解析Java中静态变量与实例变量的区别

    java类的成员变量有俩种:一种是被static关键字修饰的变量,叫类变量或者静态变量:另一种没有static修饰,为实例变量.      在语法定义上的区别:静态变量前要加static关键字,而实例 ...

  7. 读取本地excel发短信

    package com.cmcc.zysoft.sellmanager.controller; import java.io.File; import java.io.FileInputStream; ...

  8. java 基本数据类型 回顾

  9. Android:开发环境

    一.JAVA SDK(JDK)的安装 http://www.cnblogs.com/tinyphp/p/3664598.html 二.ADT-Bundle 包含了Eclipse.ADT插件和SDK T ...

  10. python xml.etree ElementTree解析 编辑 xml

    python有很多种xml解析方式,不过感觉etree的ElementTree 用起来最方便. #coding=utf-8 from xml.etree import ElementTree impo ...