eclipse导入项目后出现问题:package后面报红线

Eclipse: The declared package does not match the expected package

分析原因:

存放.java源文件的根目录source folder设置不正确

Eclipse: The declared package does not match the expected package

解决方法:

右击项目 -> “build path” -> remove 掉当前的source folder -> 添加 src(com上一级文件名)作为source folder。

Eclipse: The declared package does not match the expected package

Eclipse: The declared package does not match the expected package

Eclipse: The declared package does not match the expected package

OK,解决!


相关文章:

  • 2021-08-23
  • 2021-09-02
  • 2021-06-17
  • 2021-07-07
  • 2021-08-15
  • 2021-08-07
  • 2021-05-17
  • 2022-02-12
猜你喜欢
  • 2021-10-18
  • 2022-02-23
  • 2021-12-17
  • 2021-07-15
  • 2021-10-27
  • 2021-11-25
相关资源
相似解决方案