导入一个新项目后常会出现 
The import java.io cannot be resolved 
String cannot be resolved to a type 
其原因在于没有导入需要的包。

解决办法:

1、选中项目点击右键找到Properties->java build path->Libraries->Add External Jars->选中本项目所需要的jar包。

2、选中项目点击右键找到Properties->java build path->Libraries 看看有没有 JRE System Library,如果没有,点击Add Library,然后选中 JRE System Library->Next->Finish即可。

相关文章:

  • 2022-01-21
  • 2021-05-21
  • 2021-09-28
  • 2022-12-23
  • 2021-11-07
  • 2021-08-27
  • 2022-01-01
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-09
  • 2022-01-23
  • 2022-12-23
  • 2021-08-21
  • 2022-12-23
  • 2021-07-02
相关资源
相似解决方案