1
我在加載我正在執行的項目的級別時遇到了一些問題。我已經把從水平.tmx文件和巴紐圖像的「資產」文件夾中,但我一直有這個錯誤:使用Libgdx導出Eclipse上的平鋪地圖
Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: Couldn't load file: Downloads/simpleGraphics_tiles16x16.png
at com.badlogic.gdx.graphics.Pixmap.<init>(Pixmap.java:147)
at com.badlogic.gdx.graphics.TextureData$Factory.loadFromFile(TextureData.java:98)
at com.badlogic.gdx.graphics.Texture.<init>(Texture.java:100)
at com.badlogic.gdx.graphics.Texture.<init>(Texture.java:96)
at com.badlogic.gdx.maps.tiled.TmxMapLoader.load(TmxMapLoader.java:84)
at com.badlogic.gdx.maps.tiled.TmxMapLoader.load(TmxMapLoader.java:65)
at com.proyecto.game.Screens.PlayScreen.<init>(PlayScreen.java:28)
at com.proyecto.game.MainMenuScreen.MainMenuScreen.render(MainMenuScreen.java:57)
at com.badlogic.gdx.Game.render(Game.java:46)
at com.proyecto.game.miProject.render(miProject.java:21)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:225)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:126)
Caused by: com.badlogic.gdx.utils.GdxRuntimeException: File not found:
Downloads\simpleGraphics_tiles16x16.png (Internal)
at com.badlogic.gdx.files.FileHandle.read(FileHandle.java:136)
at com.badlogic.gdx.files.FileHandle.readBytes(FileHandle.java:222)
at com.badlogic.gdx.graphics.Pixmap.<init>(Pixmap.java:144)
... 11 more
我使用的也是這個調用地圖:
maploader = new TmxMapLoader();
map = maploader.load("Nivel1.tmx");
renderer = new OrthogonalTiledMapRenderer(map);
什麼可能導致錯誤?
請顯示您的.tmx文件? – Aryan