Error reading file: uiskin.json - Multiple People

Anything libgdx related goes here!

Error reading file: uiskin.json - Multiple People

Postby aquasheep » Mon Sep 03, 2012 3:43 am

So, I've been following some tutorials for LibGDX, mainly Steigert's. However, wherever I look, I never see a solution to the skin JSON not working. The old, official skin files appear to no longer exist in the new Github repo, so I take the ones from the tutorial, located here. However, when I put them all in the assets folder and attempt to make a new Skin object with Gdx.files.internal("uiskin.json") as the parameter, I get this error message:

Code: Select all
Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: com.badlogic.gdx.utils.SerializationException: Error reading file: uiskin.json
   at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:107)
Caused by: com.badlogic.gdx.utils.SerializationException: Error reading file: uiskin.json
   at com.badlogic.gdx.scenes.scene2d.ui.Skin.load(Skin.java:95)
   at com.badlogic.gdx.scenes.scene2d.ui.Skin.<init>(Skin.java:72)
   at com.aquasheep.Static.screens.MenuScreen.<init>(MenuScreen.java:18)
   at com.aquasheep.Static.screens.SplashScreen.dispose(SplashScreen.java:76)
   at com.aquasheep.Static.screens.SplashScreen$1.act(SplashScreen.java:57)
   at com.badlogic.gdx.scenes.scene2d.actions.SequenceAction.act(SequenceAction.java:26)
   at com.badlogic.gdx.scenes.scene2d.actions.DelayAction.act(DelayAction.java:31)
   at com.badlogic.gdx.scenes.scene2d.Actor.act(Actor.java:72)
   at com.badlogic.gdx.scenes.scene2d.Group.act(Group.java:48)
   at com.badlogic.gdx.scenes.scene2d.Stage.act(Stage.java:194)
   at com.aquasheep.Static.screens.SplashScreen.render(SplashScreen.java:68)
   at com.badlogic.gdx.Game.render(Game.java:46)
   at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:181)
   at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:104)
Caused by: com.badlogic.gdx.utils.SerializationException: Error reading file: uiskin.json
   at com.badlogic.gdx.utils.Json.fromJson(Json.java:569)
   at com.badlogic.gdx.scenes.scene2d.ui.Skin.load(Skin.java:93)
   ... 13 more
Caused by: com.badlogic.gdx.utils.SerializationException:
   at com.badlogic.gdx.scenes.scene2d.ui.Skin$2.read(Skin.java:411)
   at com.badlogic.gdx.scenes.scene2d.ui.Skin$2.read(Skin.java:402)
   at com.badlogic.gdx.utils.Json.readValue(Json.java:716)
   at com.badlogic.gdx.scenes.scene2d.ui.Skin$1.readValue(Skin.java:396)
   at com.badlogic.gdx.utils.Json.fromJson(Json.java:567)
   ... 14 more
Caused by: java.lang.ClassNotFoundException: resources
   at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:186)
   at com.badlogic.gdx.scenes.scene2d.ui.Skin$2.read(Skin.java:409)
   ... 18 more


Can someone please help with this? I know at least three other people have the same problem and have all reported it here, and I just would like to know how to make a nice-looking, functioning menu in LibGDX (with Scene2d or TWL; it doesn't matter, but TWL + LibGDX has even less documentation as far as I can tell). Please let me know what's going on here. I'm new to LibGDX, but stuff like this corrupt skin file and my previous GWT troubles make me feel like LibGDX is not a friendly library for newcomers because tutorials simply contain either not enough information to begin with (GWT) or outdated information like this non-functioning skin file.

I know there has been a big move from Google Code to Github, and I know there are now several different main websites with more than a few broken links to old Google Code areas. I would be more than happy to help clean up the website/wiki links and whip some of these tutorials into shape (or make some new ones) if someone would just extend a hand and help me out of this chaos. Please.
aquasheep
 
Posts: 6
Joined: Sat Sep 01, 2012 9:33 pm

Re: Error reading file: uiskin.json - Multiple People

Postby BurningHand » Mon Sep 03, 2012 3:59 am

viewtopic.php?f=11&t=5186&p=24926#p24926

Copying the files referenced in that post into my assets has always worked for me. Note, you should be on the nightlies when using those files.
IRC: nexsoftware / mobidevelop; GitHub: MobiDevelop;
BurningHand
 
Posts: 2812
Joined: Mon Oct 25, 2010 4:35 am

Re: Error reading file: uiskin.json - Multiple People

Postby NateS » Mon Sep 03, 2012 8:28 am

Find a test that does what you want and see how it does it. Search the tests for "new Stage" or read the docs. scene2d was refactored a month or so ago, likely your skin file doesn't match when Skin expects.
NateS
 
Posts: 1980
Joined: Fri Nov 12, 2010 11:08 am

Re: Error reading file: uiskin.json - Multiple People

Postby aquasheep » Mon Sep 03, 2012 12:02 pm

It works! :D Thank you so much for linking me those files! The problem was the files in the tutorial are too old, and I couldn't find the data files in the tests. When I looked through the source, I wasn't looking at the gdx-android-tests for the assets folder, which of course, should've been the first place I looked.
aquasheep
 
Posts: 6
Joined: Sat Sep 01, 2012 9:33 pm

Re: Error reading file: uiskin.json - Multiple People

Postby mahmoudghonim » Thu Aug 07, 2014 8:18 am

I got the same error, please I need some help

Notes:
I tried to use this skin file on another machine and it's working correctly with no errors
mahmoudghonim
 
Posts: 1
Joined: Thu Aug 07, 2014 8:13 am
Location: egypt


Return to Libgdx

Who is online

Users browsing this forum: Google [Bot], MSN [Bot] and 1 guest