libGdx ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ ์งํ›„ ๊ธฐ๋ณธ์ ์œผ๋กœ ์•ˆ๋“œ๋กœ์ด๋“œ ๋ฒ„์ „์€ ํ…Œ์ŠคํŒ…์ด ์›ํ™œํžˆ ์ง„ํ–‰์ด ๋œ๋‹ค.

 

ํ•˜์ง€๋งŒ ๋ฐ์Šคํฌํƒ‘ ๋ฒ„์ „์œผ๋กœ ํ…Œ์ŠคํŒ…ํ•˜๋ ค๊ณ  ํ•˜๋ฉด ์•„๋ž˜์™€ ๊ฐ™์€ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•œ๋‹ค.

 

    Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: Couldn't load file: badlogic.jpg
        at com.badlogic.gdx.graphics.Pixmap.<init>(Pixmap.java:140)
        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:92)
        at com.badlogic.gdx.graphics.Texture.<init>(Texture.java:88)
        at com.mygdx.game.MyGdxGame.create(MyGdxGame.java:18)
        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: badlogic.jpg (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:137)
        ... 7 more

    Process finished with exit code 0

 

 

ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•์€ ์•„๋ž˜์™€ ๊ฐ™๋‹ค.

 

1. ์ดํด๋ฆฝ์Šค ์‚ฌ์šฉ์ž์˜ ๊ฒฝ์šฐ

Run => Run Configurations.. => DesktopLauncher ์˜ Arguments ํƒญ => Working Directory => Others then browse to yourproject-android/assets/ and click Apply => Run

 

 

 

 

 

 

 

2. ์•ˆ๋“œ๋กœ์ด๋“œ ์ŠคํŠœ๋””์˜ค์˜ ๊ฒฝ์šฐ

 

  1. Run -> Edit Configurations

  2. "Working Directory:" ๋ฅผ ๊ฐ€๋ฉด ๊ธฐ๋ณธ์ ์œผ๋กœ ์•ˆ๋“œ๋กœ์ด๋“œ ์ŠคํŠœ๋””์˜ค ํ”„๋กœ์ ํŠธ ์ตœ์ƒ์œ„ ๋””๋ ‰ํ† ๋ฆฌ๋กœ ์„ค์ •๋˜์–ด์žˆ๋Š”๋ฐ => "android/assets" ๋””๋ ‰ํ† ๋ฆฌ๊นŒ์ง€ ๋“ค์–ด๊ฐ€๋„๋ก ์„ค์ •

     

 

 

 

 

์ด์ œ ๋‹ค์‹œ ์‹คํ–‰ํ•ด๋ณด์‹œ๋ฉด ์ž˜ ๋ ๊ฒ๋‹ˆ๋‹ค.

 

 

์ฆํ”„~