获取“找不到符号"在 Intellij 的 Java 项目中 [英] Getting "cannot find Symbol" in Java project in Intellij

查看:30
本文介绍了获取“找不到符号"在 Intellij 的 Java 项目中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从 GameManager.java 类调用一个静态单例实例.

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

HUD.getInstance().update(timeDelta);

HUD.java 包含 HUD 类以及其他两个相关类,HUDTextElementHUDElement.所有的类都在同一个根路径 ../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 项目中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆