Eclipse: The declared package does not match the expected package
eclipse导入项目后出现问题:package后面报红线
分析原因:
存放.java源文件的根目录source folder设置不正确
解决方法:
右击项目 -> “build path” -> remove 掉当前的source folder -> 添加 src(com上一级文件名)作为source folder。
OK,解决!
eclipse导入项目后出现问题:package后面报红线
分析原因:
存放.java源文件的根目录source folder设置不正确
解决方法:
右击项目 -> “build path” -> remove 掉当前的source folder -> 添加 src(com上一级文件名)作为source folder。
OK,解决!