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

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

问题描述

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



如图所示,即使该类与<$ c>相同的包也在 BifCreatorController $ c> 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天全站免登陆