`

eclipse cannot be resolved

阅读更多

eclipse修改代码时经常碰到“XX cannot be resolved to a type”的报错信息。


 既不是jdk不匹配(或不存在) 也不是 jar包缺失或冲突 
 
需要操作一下 Project | Clean... ,问题即可解决。

 

原因是,机制所致。因为某些特殊原因,eclipse没能自动编译源代码到build/classes(或其他classes目录),导致类型查找不到。 

 

 

 

Windows–>Preferences–>Java–>Compiler–>Building–>Output folder

勾选 ”Rebuild class files modified by others”

分享到:
评论

相关推荐

    The import com.loopj cannot be resolved 的解决方案

    cocos The import com.loopj cannot be resolved 是缺失了jar包。导入lib文件夹,或者刷新eclipse就好了。

    java eclipse 出现 xxx cannot be resolved to a type 错误解决方法

    主要介绍了java eclipse 出现 xxx cannot be resolved to a type 错误解决方法的相关资料,需要的朋友可以参考下

    Calendar类--Eclipse

    在最近的java学习中,写了一些小例子,都是一些常用知识,上传希望大家下载,共同学习。

    eclipse_workspace设置

    eclipse_workspace设置

    ANT蚁群算法源代码下载

    The import org.eclipse cannot be resolved 则表示需要安装SWT类库,下载SWT类库,然后将其加入CLASSPATH 如果是在eclipse中开发,你需要在你的工程构建路径中加入swt.jar的路径,在运行中的jvm参数中加入 -Djava....

    Java编程排错技巧

    一、Eclipse提示错误The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files  调试Reflact时,Eclipse一直提示The type java.lang.CharSequence cannot be...

    Eclipse Jee Oxygen 安装Activiti-5.1.8.0(绕开在线资源下载)

    Eclipse Jee Oxygen 安装 activiti-5.18 1.在jee-oxygen\eclipse\configuration\org.eclipse.update 中找到platform.xml,在里面添加 url="features/org.activiti.designer.feature_5.18.0.201508100929/"> 2.C...

    org.apache.commons.codec包

    解决经常遇到的The import org.apache.commons.codec cannot be resolved问题,只需导入文件中的commons-codec-1.11.jar就可以,如和导入包就不赘述了。

    servlet-api.jar

    编写websocket时需要导入包,在Eclipse中编写servlet时出现"The import javax.servlet cannot be resolved" 问题解决办法

    jdom1.0.jar

    Myeclipse或者eclipse中提示The import org.jdom cannot be resolved需要引入以上札包。

    Eclipse新建Android项目报错解决方案详细汇总

    如图,如果报The import android.support cannot be resolved或者android.support.v7.app.ActionBarActivity类似的错误。 解决方案一 :缺少相关依赖包,这里提供亲测有效的库文件,需要导入android-support-v7-...

    websocket-api.jar

    websocket-api.jar下载,websocket必备jar包,在Eclipse中编写servlet时出现"The import javax.servlet cannot be resolved" 问题解决办法

    用Java编写的军棋游戏

    用JAVA编写的一个Stratego游戏,类似于国内的军棋游戏,能够实现网络对战。附上源代码,编写类似游戏的同学可以借鉴借鉴。...PS:用eclipse运行出现错误:HelpFrame cannot be resolved to a type. 望高手解答。

    jbcl.jar(两个jbcl.jar哪个好用就采用哪个)

    在eclipse jbuilder中都会用到...否则会出现The import com.borland cannot be resolved这个错误。网上费了九牛二虎之力总算让我找到了这个包。大家记得下了后要导入哦。不是复制黏贴。我用了解压后的第二个包,很好!

    尚筹网项目中遇到的错误,问题.docx

    3. The import org.springframework.test cannot be resolved 无法导包 4. 运行Junit测试报错java.io.FileNotFoundException: class path resource [mybatis-config.xml] cannot be opened because it:java.io....

    Android 解决build path errors的问题

    主要看第三条:The project cannot be built until build path errors are resolved 这个错误的原因是:AndroidManifest.xml中配置的主包名与AndroidManifest.xml 中配置的activtiy所在的包不一致造成的。 修改...

Global site tag (gtag.js) - Google Analytics