First of all, I saw GdxRuntimeException: Couldn't load file but I think I have different problems here.
I'm trying to add a skin to a screen. The code is in Scala.
val skin = new Skin(Gdx.files.internal("uiskin.json"))
I use libGdx 1.1.0. The uiskin.json is from LibGdx's Github repo. Here is the errors:
com.badlogic.gdx.utils.GdxRuntimeException: Error reading pack file: uiskin.atlas
at com.badlogic.gdx.graphics.g2d.TextureAtlas$TextureAtlasData.<init>(TextureAtlas.java:187)
at com.badlogic.gdx.graphics.g2d.TextureAtlas.<init>(TextureAtlas.java:231)
at com.badlogic.gdx.graphics.g2d.TextureAtlas.<init>(TextureAtlas.java:226)
at com.badlogic.gdx.graphics.g2d.TextureAtlas.<init>(TextureAtlas.java:216)
at com.badlogic.gdx.scenes.scene2d.ui.Skin.<init>(Skin.java:69)
at com.pt2121.skintest.HelpScreen.show(HelpScreen.scala:39)
at com.badlogic.gdx.Game.setScreen(Game.java:61)
at com.pt2121.skintest.SkinTest.create(SkinTest.scala:8)
at com.badlogic.gdx.backends.android.AndroidGraphics.onSurfaceChanged(AndroidGraphics.java:236)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1512)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
Caused by: java.lang.NullPointerException
at java.lang.Enum$1.create(Enum.java:43)
at java.lang.Enum$1.create(Enum.java:35)
at libcore.util.BasicLruCache.get(BasicLruCache.java:54)
at java.lang.Enum.getSharedConstants(Enum.java:209)
at java.lang.Enum.valueOf(Enum.java:189)
at com.badlogic.gdx.graphics.Pixmap$Format.valueOf(Pixmap.java:49)
at com.badlogic.gdx.graphics.g2d.TextureAtlas$TextureAtlasData.<init>(TextureAtlas.java:120)
... 10 more
I've been searching for hours. I guess it might be something to do with Scala or libGdx version. (I have pretty much the same code in JAVA with libGdx 0.99 and it works fine.) My project is at https://github.com/prt2121/skintest. Thanks