[英]“Error:(3, 24) java: package com.badlogic.gdx does not exist”, How to fix this?
I'm using intelliJ with libgdx. 我在libgdx中使用intelliJ。 I created a new project using libgdx and imported it to intellij.
我使用libgdx创建了一个新项目,并将其导入intellij。 when I try to build it I get this error:
当我尝试构建它时,出现以下错误:
Error:(3, 24) java: package com.badlogic.gdx does not exist
and other similar problems. 和其他类似的问题。 what could be the reason for it?
可能是什么原因呢?
ps I found a similar post about it but I couldn't found the gradle window and also I think that it won't help ps我找到了与此类似的帖子,但是找不到gradle窗口,而且我认为它也无济于事
SOLUTION: The problem was that after I created the project using libgdx-setup.jar, Instead of using "Open Project" I used "Import Project" and it messed up the project. 解决方案:问题是,在我使用libgdx-setup.jar创建项目后,我使用了“导入项目”,而不是使用“打开项目”,并且搞乱了该项目。
Use "Open Project" after you create the project using libgdx-setup.jar file and in advanced settings check the IDEA checkbox 使用libgdx-setup.jar文件创建项目并在高级设置中选中“ IDEA”复选框后,使用“打开项目”
Looks like the gdx.jar
is missing in your classpath. 看起来您的类路径中缺少
gdx.jar
。 Download and add it to your classpath. 下载并将其添加到您的类路径中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.