当我尝试在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$1.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
答案 0 :(得分:1)
我猜您需要设置the documentation中提到的Working directory
。
桌面:运行 - >编辑配置...,单击加号(+)按钮并选择应用程序。将名称设置为桌面。设置字段使用模块的类路径到桌面,然后单击Main类字段的按钮并选择DesktopLauncher类。将Working目录设置为android / assets /(或your_project_path / core / assets /)文件夹!单击Apply,然后单击OK。