问题描述
我从 GameManager.java
类调用一个静态单例实例.
I make this call to a static singleton instance from the class GameManager.java
.
HUD.getInstance().update(timeDelta);
HUD.java
包含 HUD
类以及其他两个相关类,HUDTextElement
和 HUDElement
.所有的类都在同一个根路径 ../src/org/mypackage
.
HUD.java
contains the HUD
class as well as two other related classes, HUDTextElement
and HUDElement
. All the classes are in the same root path ../src/org/mypackage
.
但是,在 IntelliJ 中编译这个 java 项目时,我在调用 HUD.getInstance()
的那一行得到找不到符号 HUD.
However, when compiling this java project in IntelliJ I get cannot find Symbol HUD on the line I make the HUD.getInstance()
call.
这个完全相同的代码在 eclipse 中编译得很好,知道问题是什么吗?
This exact same code compiles just fine in eclipse, any idea what the problem is?
推荐答案
选择Build->Rebuild Project就解决了
Select Build->Rebuild Project will solve it
这篇关于获取“找不到符号"在 Intellij 的 Java 项目中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!