导入项目报“The type java.lang.String cannot be resolved. It is indirectly referenced from required .clas”

在使用Myeclipse导入一个外来的工程时,经常会出现 The type java.lang.String cannot be resolved. It is indirectly referenced from required .clas 错误,这主要是因为你的电脑上安装了多个版本的jdk,解决方法如下:

在你的项目上右键选择 Properties --> Java Bulid Path --> Libraries 找到JDK选中后点击Remove将它删除
导入项目报“The type java.lang.String cannot be resolved. It is indirectly referenced from required .clas”_第1张图片
删除后选择 Add Libraries --> JRE System Library 点击Next进入下一步
导入项目报“The type java.lang.String cannot be resolved. It is indirectly referenced from required .clas”_第2张图片
选择系统自带的JDK或是选择自己适合的包都可,点击 Finish 完成
导入项目报“The type java.lang.String cannot be resolved. It is indirectly referenced from required .clas”_第3张图片

你可能感兴趣的:(开发问题解决方法)