Intellij 无法 运行 项目

Intellij cannot run project

当我尝试 运行 我在 Intellij 中的项目时,它失败 运行,但它 运行 在 NetBeans IDE 中没问题。关于这是为什么的任何想法?

关于我的项目:

日志:

Exception in thread "LWJGL Application" com.badlogic.gdx.utils.SerializationException: Error parsing file: maps/demoMap.tmx
at com.badlogic.gdx.utils.XmlReader.parse(XmlReader.java:83)
at com.badlogic.gdx.maps.tiled.TmxMapLoader.load(TmxMapLoader.java:78)
at com.badlogic.gdx.maps.tiled.TmxMapLoader.load(TmxMapLoader.java:65)
at com.kappaDelta.espRPG.Assets.load(Assets.java:46)
at com.kappaDelta.espRPG.Game.create(Game.java:14)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:143)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.run(LwjglApplication.java:120)

Caused by: com.badlogic.gdx.utils.GdxRuntimeException: File not found: maps\demoMap.tmx (Internal)
at com.badlogic.gdx.files.FileHandle.read(FileHandle.java:136)
at com.badlogic.gdx.files.FileHandle.reader(FileHandle.java:163)
at com.badlogic.gdx.utils.XmlReader.parse(XmlReader.java:81)
... 6 more

我猜您需要设置 Working directory,如 the documentation 中所述。

Desktop: Run -> Edit Configurations..., click the plus (+) button and select Application. Set the Name to Desktop. Set the field Use classpath of module to desktop, then click on the button of the Main class field and select the DesktopLauncher class. Set the Working directory to your android/assets/ (or your_project_path/core/assets/) folder! Click Apply and then OK.