惊喜:The type java.lang.Object cannot be resolved.It is indirectly referenced from required .class fi

来源:互联网 发布:linux搜狗输入法切换 编辑:程序博客网 时间:2024/06/14 22:04

    惊喜:The type java.lang.Object cannot be resolved.It is indirectly referenced from 

required .class file




分析

   这是什么鬼?The type java.lang.Object cannot be resolved.It is indirectly referenced from required .class file

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




解决方案:

   导入缺失的包就可以了。


1,出现情况如下,点击“Configure build path,,,,”
 









2,添加相关的包,点击“Add Library”如下:


 



3,选择 “JRE System Library”如下:



             

 


             




小结:

         问题不难,小小的一个总结,希望对您有用,在垫底的总结中记录自己的积累。



0 0