问题
Im trying to load a tiled map in libGDX with
tileMap = new TmxMapLoader().load("maps/level1.tmx");
but somehow it returns a File not found exception:
Caused by: com.badlogic.gdx.utils.GdxRuntimeException: File not found: maps\level1.tmx (Internal)
at com.badlogic.gdx.files.FileHandle.read(FileHandle.java:136)
at com.badlogic.gdx.files.FileHandle.reader(FileHandle.java:164)
at com.badlogic.gdx.utils.XmlReader.parse(XmlReader.java:81)
... 9 more
I already tried to change the path to "/maps/level1.tmx" and other things but nothing works. It returns the file not found exception every time. Can someone see the error?
The path to the .tmx file is:
assets/maps/level1.tmx
the orginal assets folder is in the android project and in every project, the assets folder is linked..
来源:https://stackoverflow.com/questions/24123681/libgdx-file-not-found