首页 > 技术文章 > 2017.7.10 Package name does not correspond to the file path

lyh421 2017-07-10 13:56 原文

参考来自:https://stackoverflow.com/questions/26440623/package-name-does-not-correspond-to-the-file-path-intellij

 

突然出现这个错误:Package name does not correspond to the file path

明明路径没有错,从VCS上更新了代码,也仍然报错。

 

检查后发现:需要强制更新代码。因为有人把文件夹的名字从 Listener改为了 listener。所以不是编译器无法识别,就是代码路径不对。

 

推荐阅读