Getting “cannot find Symbol” in Java project in Intellij

前端 未结 24 913
清酒与你
清酒与你 2020-12-04 10:33

I make this call to a static singleton instance from the class GameManager.java.

HUD.getInstance().update(timeDelta);

HU

24条回答
  •  無奈伤痛
    2020-12-04 11:25

    Thanks for the help so far, turns out the fix was to compile HUD.java first (right click on the file-> Compile HUD.java). After compiling the java file the rest of the project could be compiled without any problems.

    I don't really know why this fixed it, or why IntelliJ wouldn't do this automatically, but root error seems it has to do with IntelliJ not correctly handling having multiple classes in a single .java file.

提交回复
热议问题