Error!]the type java.lang.String cannot be resolved. it is indirectly referenced from required .class files
原因:导入一个外来的工程时会出现以上错误,是因为你的电脑上安装了多个版本的jdk
解决方法:
(1)project->properties->Java Bulid Path 将原有的jdk删除
(2)Java Build Path -----> Libraries---->Add Libraries----->JRE System Library ,选择适合的即可。




"the type java.lang.String cannot be resolved. it is indirectly referenced from required .class"
最新推荐文章于 2021-04-08 18:54:52 发布
本文详细介绍了在导入外来Java工程时遇到的JDK版本冲突问题及其解决方法。冲突通常表现为无法解析类型java.lang.String的错误,原因是计算机上安装了多个JDK版本。文章提供了具体的步骤来定位并解决此问题,包括调整项目属性和选择合适的JDK。
1万+

被折叠的 条评论
为什么被折叠?



