(转)Eclipse “cannot be resolved to a type” error
原:http://www.cnblogs.com/xuxm2007/archive/2011/10/20/2219104.html
Eclipse “cannot be resolved to a type” errorhttp://zhaoningbo.iteye.com/blog/1137215
引言: 
    eclipse新导入的项目经常可以看到“XX cannot be resolved to a type”的报错信息。本文将做以简单总结。 
正文: 
    (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目录),导致类型查找不到。
Based on the comments here, I started checking how I could make sure that my Ant build
wouldn’t interfere with my Eclipse build.
I found an option in Eclipse that clears up the problem (and is possibly more efficient than
changing the 2 build system’s output folders).
Windows–>Preferences–>Java–>Compiler–>Building–>Output folder–>
”Rebuild class files modified by others”. This exists in Eclipse 3.5; I’m not sure about earlier versions.
Checking this seems to have fixed my problems.
(转)Eclipse “cannot be resolved to a type” error的更多相关文章
- Eclipse “cannot be resolved to a type” error
		
引言: eclipse新导入的项目经常可以看到"XX cannot be resolved to a type"的报错信息.本文将做以简单总结. 正文: (1)jd ...
 - Maven项目中提示:Eclipse “cannot be resolved to a type” error
		
我的解决办法是这个: 临时解决方法是:Clean项目 ********百度到的其他解决办法,统一归纳此处****************** (1)jdk不匹配(或不存在) 项目指定的jdk为“jdk ...
 - Eclipse “cannot be resolved to a type”
		
遇到这坑爹的问题,网上各种答案. 只有这个能解决我的问题,eclipse机制问题: Eclipse “cannot be resolved to a type”
 - Eclipse “cannot be resolved to a type” 错误
		
eclipse中遇到了“XX cannot be resolved to a type”的报错信息.网上找了些资料,本文将做以简单总结. (1)jdk不匹配(或不存在) 项目指定的jdk为“j ...
 - eclipse中编译时enum出现cannot be resolved to a type错误
		
eclipse中编译时enum出现cannot be resolved to a type错误 通常是因为eclise使用的jdk版本的问题...默认是使用的是jdk1.5 应该去选择成jdk1.6或 ...
 - "XX cannot be resolved to a type "eclipse报错及解决说明
		
转自:http://zhaoningbo.iteye.com/blog/1137215 引言: eclipse新导入的项目经常可以看到“XX cannot be resolved to a type” ...
 - eclipse import的项目报autowired cannot be resolved to a type的错误
		
eclipse报autowired cannot be resolved to a type的错误,一般情况是依赖的JDK或者jar包有问题,检查build path可以排查文件,我今天遇到这个情况, ...
 - (转)eclipse报错及解决说明 "XX cannot be resolved to a type "
		
场景:在项目开发时,一个工程引用另一个工程中的文件,出现报错“XX cannot be resolved to a type”,但是在实际通过跟踪“F3”能够找到相应的文件,最终用方法4解决. 引言: ...
 - "XX cannot be resolved to a type "eclipse报错及解决
		
好久都没有写博了,还记得自己准备考研,结果你会发现——你永远不知道,你将会走上哪个路. 长远的目标是好的,但有些时候身不由己也迫不得已!做好自己的当下就是好的. 不论搞什么,总会遇到各种各样的问题,以 ...
 
随机推荐
- 【转】 Linux 线程同步的三种方法
			
线程的最大特点是资源的共享性,但资源共享中的同步问题是多线程编程的难点.linux下提供了多种方式来处理线程同步,最常用的是互斥锁.条件变量和信号量. 一.互斥锁(mutex) 通过锁机制实现线程间的 ...
 - C# 给软件加注册码功能
			
为自己写的程序加一个注册功能吧.生成的机器号是根据CPU和硬盘号来的,根据自己的需求改成是否是随机生成. 代码直接粘贴到新建类覆盖原代码就能直接用了. using System; using Syst ...
 - 静态类和静态类成员(C# 编程指南)
			
静态类与非静态类基本相同,但存在一个区别:静态类不能实例化. 也就是说,不能使用 new 关键字创建静态类类型的变量. 因为没有实例变量,所以要使用类名本身访问静态类的成员. 例如,如果名为 Util ...
 - 在ArcMap 10.3中创建和编辑数据
			
在ArcMap 10.3中创建和编辑数据 .......待补充 新建 创建一个新文件((Points, Polylines, and Polygons/点.线.多边形)
 - Hibernate4+Spring JPA+SpringMVC+Volecity搭建web应用(二)
			
SpringMVC.xml配置 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns=&qu ...
 - PHP Warning: ob_start() : output handler 'ob_gzhandler conflicts with 'zlib output compression'
			
安装phpcms过程中,会遇到Warning: ob_start() : output handler 'ob_gzhandler conflicts with 'zlib output compr ...
 - JavaScript访问修改css样式表
			
1.访问元素中style属性的css样式 可以根据属性的ID或name标签利用dom操作直接访问到内部的css样式,直接使用style对象访问 <div id="myid" ...
 - Extjs中处理mouseover的闪烁问题
			
在使用mouseover和mouseout实现鼠标滑动效果并且target的dom较复杂时,可能会产生闪烁现象,产生这个问题的一个原因是mouseover事件本身的冒泡特性和target dom的子元 ...
 - java中汉字自动转换成拼音
			
java中汉字自动转换成拼音 1.需要下载jar包 pinyin4j.2.5.0.jar ,加入到WEB-INF下的lib里边,右键add to bulid path. 2.[代码]PinYinUti ...
 - 【转载】SAP的标准对话框函数
			
http://blog.sina.com.cn/s/blog_721b218c01012j0y.html 在用户设计sap的程序时,经常需要一些对话框,用户可以自己编写,但使用SAP系统中提供了的对话 ...