IntelliJ在编译时无法在同一个包中找到类 [英] IntelliJ can't find classes in same package when compiling

查看:377
本文介绍了IntelliJ在编译时无法在同一个包中找到类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

作为我上一个问题的扩展(



从图中可以看到,在 BifCreatorController 的行中发生了,即使该类与 BifCreatorView



就像我上一个问题,我不明白为什么IntellJ吐出这些错误。这个项目在Eclipse中工作正常,但我正在寻找开始远离日食。

解决方案

这是因为BifCreatorController从编译中排除(参见文件名旁边的小X 。一个原因是文件在编译时遇到一些错误,IDEA建议从编译中排除它并且您已经接受。



转到文件>设置>构建,部署>编译器>排除并从其中删除。


As an extension to my previous question (IntelliJ can't find depencency when compiling, but can in editor.) which got solved, I now have a new issue which has sprung up.

Within the same packages, references to other classes are showing up with errors:

As you can see in the picture, there is happening at the line involving the BifCreatorController, even though that class is in the same package as the BifCreatorView.

Just like my previous question, I am failing to understand why IntellJ is spitting out those errors. This project works just fine in Eclipse, but I am looking to start moving away from eclipse.

解决方案

This is because BifCreatorController is excluded from compilation (see the small "X" top-left icon near to the file name). One reason would be the file got some errors while compiling, IDEA proposed to exclude it from compilation and you had accepted.

Go to "File > Settings > Build, Execution, Deployment > Compiler > Excludes" and remove it from there.

这篇关于IntelliJ在编译时无法在同一个包中找到类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆