When trying to load the default skin from LibGDX's tests
https://github.com/libgdx/libgdx/tree/master/tests/gdx-tests-android/assets/data (uiskin.atlas, uiskin.json, uiskin.png and default.fnt)
I get the following error.
Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: No com.badlogic.gdx.scenes.scene2d.ui.TextField$TextFieldStyle registered with name: default
at com.badlogic.gdx.scenes.scene2d.ui.Skin.get(Skin.java:149)
at com.badlogic.gdx.scenes.scene2d.ui.Skin.get(Skin.java:134)
at com.badlogic.gdx.scenes.scene2d.ui.TextField.<init>(TextField.java:116)
at com.badlogic.gdx.scenes.scene2d.ui.TextArea.<init>(TextArea.java:57)
at me.winter.socialplatformer.menu.ConnectScreen.show(ConnectScreen.java:30)
at com.badlogic.gdx.Game.setScreen(Game.java:61)
at me.winter.socialplatformer.Platformer.create(Platformer.java:39)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:147)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:124)
Here's how I'm loading and using the skin:
assetManager = new AssetManager();
assetManager.load("gfx/uiskin.atlas", TextureAtlas.class);
//...
assetManager.finishLoading();
//...
TextArea textArea = new TextArea("test", new Skin(getAssets().get("gfx/uiskin.atlas", TextureAtlas.class)));
textArea.setBounds(100f, 100f, 500f, 500f);
It looks like it can't find this:
com.badlogic.gdx.scenes.scene2d.ui.TextField$TextFieldStyle: {
default: { selection: selection, background: textfield, font: default-font, fontColor: white, cursor: cursor }
},
However, this line is present in file uiskin.json downloaded from the repo. All files are up to date. Additionnally, the error might be linked to the bad json syntax warnings IntelliJ is giving me.
