遇到The type XXX cannot be resolved. It is indirectly referenced from required .class files错误.....,查找的解决办法如下:

一: 错误提示: It is indirectly referenced from required .class file 错误的解决

原因:你正要使用的类调用了另一个类,而这个类又调用了其他类,这种关系可能会有好多层。而在这个调用的过程中,某个类所在的包的缺失就会造成以上那个错误。

解决方法:导入缺失的包

二:
The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project

The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files

出現以上訊息的原因是因為你裝了多個版本的jre或jdk的關係。本來Eclipse在建立專案時,會自動參照你的jre路徑,但多個版本就沒辦法了。
你只能手動建立…
1. 進入window\preferences\java\Installed JREs
1)按Add
2)輸入JRE Name, 例JDK1.5.0.03
3)JRE home directory, 選擇安裝的路徑
4)按OK
2. 進入Project\properties\Java Bulid Path
1)Add library
2)選JRE System Library後按Next
3)選workplace default JRE後按finish...


按照这种方式处理了看下...  解决了来结帖...

Feedback

# re: The type XXX cannot be resolved. It is indirectly referenced from required .class files错误.....  回复  更多评论   

2007-08-14 15:22 by 8383
只要有博客就可以在8383.com免费申请.CN域名,输入域名就能直接进入博客,我刚申请了一个,快输入8383hosting.cn到我的博客看我是如何耍酷吧。

# re: The type XXX cannot be resolved. It is indirectly referenced from required .class files错误.....  回复  更多评论   

2007-09-12 21:21 by cat
thanks

# re: The type XXX cannot be resolved. It is indirectly referenced from required .class files错误.....  回复  更多评论   

2008-04-18 11:04 by Harvey
多谢~

# thanks kiss u fat face  回复  更多评论   

2008-11-16 11:40 by aladdin
好东西要共享

# thanks kiss u fat face  回复  更多评论   

2008-11-16 11:54 by aladdin
有很多时候tomcat的\webapps\ROOT.myeclipse.bak的缓存,全部删除,也可以去掉这个错误的

# re: The type XXX cannot be resolved. It is indirectly referenced from required .class files错误.....  回复  更多评论   

2009-05-06 11:34 by bob
好东西,谢谢

# re: The type XXX cannot be resolved. It is indirectly referenced from required .class files错误.....  回复  更多评论   

2009-09-10 21:39 by Teny
多谢楼主,问题解决了

# re: The type XXX cannot be resolved. It is indirectly referenced from required .class files错误.....  回复  更多评论   

2010-08-24 19:12 by 林潇
糟糕!谷歌浏览器无法找到 8383hosting.cn

# re: The type XXX cannot be resolved. It is indirectly referenced from required .class files错误.....  回复  更多评论   

2010-10-15 16:29 by xmshen
好贴,结果了我的问题,谢谢啦

# re: The type XXX cannot be resolved. It is indirectly referenced from required .class files错误.....  回复  更多评论   

2012-03-16 13:22 by 记录2.02
Thank you.
只有注册用户登录后才能发表评论。

posts - 186, comments - 76, trackbacks - 0, articles - 1

Copyright © i have only belief