I make this call to a static singleton instance from the class "GameManager.java".
HUD.getInstance().update(timeDelta);
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
However, when compiling this java project in IntelliJ I get "cannot find Symbol HUD" on the line I make the HUD.getInstance() call.
This exact same code compiles just fine in eclipse, any idea what the problem is?
解决方案
I had the same problem, and turns out I had never completely compiled the fresh project. So right-clicking and selecting Compile'' (shift-cmd-F9 on mac) fixed it. It seems the compile on save does not 'see' non-compiled files.
Marking the src folder as source did not help in my case.