Getting “cannot find Symbol” in Java project in Intellij

前端 未结 24 923
清酒与你
清酒与你 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:23

    Make sure the source file of the java class you are trying to refer to has a .java extension. It was .aj in my case (I must have hit "Create aspect" instead of "Create class" when creating it). IntelliJ shows the same icon for this file as for "normal" class, but compiler does not see it when building.

    Changing .aj to .java fixed it in my case.

提交回复
热议问题