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包导入项目即可.…
eclipse中编译时enum出现cannot be resolved to a type错误 通常是因为eclise使用的jdk版本的问题...默认是使用的是jdk1.5 应该去选择成jdk1.6或者更高的版本. 项目右键->properties->Java Compiler->Compiler Compliance level 选择更高的版本 参考: http://stackoverflow.com/questions/3811012/can-not-compile-enums-in…
原:http://www.cnblogs.com/xuxm2007/archive/2011/10/20/2219104.html Eclipse “cannot be resolved to a type” error http://chenxiaohu612.blog.163.com/blog/static/192214286201171004911955/ http://zhaoningbo.iteye.com/blog/1137215 引言: eclipse新导入的项目经常可…
引言: 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+点击,可能能…
引言: 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&qu…
No enclosing instance of type SomeClass is accessible. Must qualify the allocation with an enclosing instance of type SomeClass (e.g. x.new A() where x is an instance of SomeClass). 这是怎么发现的?? 拿Eclipse编写Java的AWT/Swing程序时,编写了一个public class MainFrame ex…