关闭

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

标签: eclipsejava
156人阅读 评论(0) 收藏 举报
分类:

        参考文章地址:参考文章网址


        问题描述:The type java.lang.Object cannot be resolved.It is indirectly referenced from required .class file

           eclipse android应用开发。工程原本好好的,突然有天就用不了了,错误如上,出现在package之前。谁能告诉我怎么办


          在这里,Eclipse的Java开发,同样也是用本方法。


           在我本人进行Java开发过程中,Eclipse中已经将JDK、Tomcat环境安装、搭配完毕,但是某一个.java文件的头部"package org.api"中的package的下方有一个红色的小波浪线,显示"The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files"的错误,让我很苦恼,我也为此花费了非常多的时间来解决此问题!


            通过参考本文开头的文章,我成功解决了Eclipse中的问题。


解决方案

        第一步:查看JDK是否配置到Eclipse中,如果Eclipse中已经配置了JDK,则删去JDK配置(如图一所示)。之后按照步骤二及以后的步骤进行操作。如果JDK没有配置到Eclipse中,则这种情况我还没有遇到,读者可自己多尝试试着操作一下。          

         

         

图片一

        

        第二步:直接在首行package中点击提示



图片二


         第三步:在Java Build Path中的Libraries选项栏界面中,点击Add Library...



图片三


         第四步:在新弹出的界面中选择“JRE System Library”,之后点击"Next".



图片四


          第五步:在JRE System Library界面中,选择Workspace default JRE(JDK),之后点击"Finish" .



图片五


          我就是通过这种方式,解决我的问题的。


                  祝各位好运                 


0
0
查看评论

It is indirectly referenced from required .class files(导入项目报错原因与解决方法)

这几天导入另一个开发的新项目时,报了个头疼的错误 The project was not built since its build path is incomplete.The type java.util.Ob cannot be resolved. It is indirectly refe...
  • hello_yz
  • hello_yz
  • 2014-10-15 17:05
  • 16590

解决jdk8之The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .

之前在myeclipse10上配置jdk1.8,就报这个错误: The type java.lang.CharSequence cannot be resolved. It is indirectly ref...
  • qq_17864929
  • qq_17864929
  • 2015-08-11 09:12
  • 6462

Maven项目报错:The type javax.validation.Payload cannot be resolved. It is indirectly referenced from req

一、问题描述 Maven项目报错:The type javax.validation.Payload cannot be resolved. It is indirectly referenced from required .class files 二、解决方法 由于项目...
  • u011781521
  • u011781521
  • 2017-06-08 22:15
  • 2202

在eclipse使用到json时出现The type java.lang.Object cannot be resolved. It is indirectly referenced from req

The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files 当你在Eclipse引用不同版本JDK工程时会发生该问题。由于你开发环境中应用了多个版本的JDK...
  • u014535666
  • u014535666
  • 2015-05-14 21:45
  • 1972

The type XXX cannot be resolved. It is indirectly referenced from required .class files错误.

在Eclipse中遇到The type XXX cannot be resolved. It is indirectly referenced from required .class files错误.....,查找的解决办法如下: 一:  It is indirectly refere...
  • linyeban
  • linyeban
  • 2016-12-22 12:10
  • 1532

关于jdk的报错问题 It is indirectly referenced from required .class files

今天在一个@Test编码完全正确的地方耗了很久,由于这样一个错误 The type java.nio.CharBuffer cannot be resolved. It is indirectly referenced from required .class files 网上搜了很久都...
  • u011118321
  • u011118321
  • 2015-08-06 23:31
  • 1802

The type javax.swing.JComponent cannot be resolved. It is indirectly referenced from required .cl

The type javax.swing.JComponent cannot be resolved. It is indirectly    referenced from required .class files 类型javax.swing.jcomponent无法解析。它...
  • wo6218298
  • wo6218298
  • 2016-12-19 08:40
  • 523

It is indirectly referenced from required .class files错误查找的解决办法如下

一: 错误提示: It is indirectly required from required .class file 原因:你正要使用的类调用了另一个类,而这个类又调用了其他类,这种关系可能会有好多层。而在这个调用的过程中,某个类所在的包的缺失就会造成以上那个错误。解决方法:导入缺失的包二: ...
  • u010735684
  • u010735684
  • 2015-09-25 15:21
  • 16846

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

The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files. 软件环境: win7 64bit jdk 1.8 场...
  • xtj332
  • xtj332
  • 2014-12-01 18:42
  • 28430

在kettle6.0中集成插件报错:The type........It is indirectly referenced from required .class files

在代码的开头报错:The type org.pentaho.metastore.api.IMetaStore cannot be resolved. It is indirectly referenced from required .class files 解决办法:找到metastore-...
  • xiedongdong1
  • xiedongdong1
  • 2015-11-05 10:49
  • 876
    个人资料
    • 访问:126320次
    • 积分:2459
    • 等级:
    • 排名:第17690名
    • 原创:64篇
    • 转载:175篇
    • 译文:0篇
    • 评论:75条
    最新评论