Quantcast
Channel: Question and Answer » libgdx
Viewing all articles
Browse latest Browse all 434

How to properly import a .tmx file with the image used to create it?

$
0
0

I tried to create some maps with tield map, and the image I use to create this map(tielset texture) is stored in the desktop.
But after the map generation, I copied the file (map.tmx) and (texture.png) internal file (maps):

map = new TmxMapLoader () load ("maps / map.tmx");

but I still have this error even discounting that I did …
for the information I work with gradle. What do you think of this error?

Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException:                  Couldn't load file: maps/desktop/bin/Texture/TextureB.png
at com.badlogic.gdx.graphics.Pixmap.<init>(Pixmap.java:140)
at com.badlogic.gdx.graphics.glutils.FileTextureData.prepare(FileTextureData.java:64)
at com.badlogic.gdx.graphics.Texture.load(Texture.java:130)
at com.badlogic.gdx.graphics.Texture.<init>(Texture.java:121)
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:119)
at com.badlogic.gdx.maps.tiled.TmxMapLoader.load(TmxMapLoader.java:104)
at de.bitowl.libgdx.L2.<init>(L2.java:117)
at de.bitowl.libgdx.MenuScreen$1.clicked(MenuScreen.java:128)
at com.badlogic.gdx.scenes.scene2d.utils.ClickListener.touchUp(ClickListener.java:89)
at com.badlogic.gdx.scenes.scene2d.InputListener.handle(InputListener.java:57)
at com.badlogic.gdx.scenes.scene2d.Stage.touchUp(Stage.java:342)
at com.badlogic.gdx.backends.lwjgl.LwjglInput.processEvents(LwjglInput.java:320)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:199)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:114)
Caused by: com.badlogic.gdx.utils.GdxRuntimeException: File not found:      mapsdesktopbinTexturesTextureB.png (Internal)
at com.badlogic.gdx.files.FileHandle.read(FileHandle.java:136)
at com.badlogic.gdx.files.FileHandle.readBytes(FileHandle.java:220)
at com.badlogic.gdx.graphics.Pixmap.<init>(Pixmap.java:137)

Every idea will be appreciated.


Viewing all articles
Browse latest Browse all 434

Trending Articles