GithubHelp home page GithubHelp logo

Comments (14)

kotcrab avatar kotcrab commented on July 17, 2024

What build system? Gradle or Maven?
26 maj 2015 5:00 AM "StrongJoshua" [email protected] napisaล‚(a):

This is the error I get when trying to launch my game from a runnable .jar
file:

Exception in thread "LWJGL Application" com.badlogic.gdx.utils.SerializationExce
ption: Error reading file: com/kotcrab/vis/ui/uiskin.json
at com.badlogic.gdx.scenes.scene2d.ui.Skin.load(Skin.java:97)
at com.badlogic.gdx.scenes.scene2d.ui.Skin.(Skin.java:74)
at com.kotcrab.vis.ui.VisUI.load(VisUI.java:55)
at com.kotcrab.vis.ui.VisUI.load(VisUI.java:50)
at com.strongjoshua.reverseblade.ReverseBlade.create(ReverseBlade.java:2
8)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplic
ation.java:143)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplicati
on.java:120)
Caused by: com.badlogic.gdx.utils.SerializationException: Error reading file: co
m/kotcrab/vis/ui/uiskin.json
at com.badlogic.gdx.utils.Json.fromJson(Json.java:683)
at com.badlogic.gdx.scenes.scene2d.ui.Skin.load(Skin.java:95)
... 6 more
Caused by: com.badlogic.gdx.utils.SerializationException: Error parsing file: co
m/kotcrab/vis/ui/uiskin.json
at com.badlogic.gdx.utils.JsonReader.parse(JsonReader.java:77)
at com.badlogic.gdx.utils.Json.fromJson(Json.java:681)
... 7 more
Caused by: com.badlogic.gdx.utils.GdxRuntimeException: File not found: com\kotcr
ab\vis\ui\uiskin.json (Classpath)
at com.badlogic.gdx.files.FileHandle.read(FileHandle.java:137)
at com.badlogic.gdx.files.FileHandle.reader(FileHandle.java:164)
at com.badlogic.gdx.utils.JsonReader.parse(JsonReader.java:75)
... 8 more

That line is when I call: VisUI.load();
I have had this happen with my own LibGdx addon
https://github.com/StrongJoshua/libgdx-inGameConsole.

The only way I was able to prevent my plugin from erroring was to load the
skin that it uses from my game itself, rather than the dependency's
project. Maybe you have more insight into how to fix this.

โ€”
Reply to this email directly or view it on GitHub
#13.

from vis-ui.

StrongJoshua avatar StrongJoshua commented on July 17, 2024

LibGdx projects use Gradle, so that's what I'm using.

from vis-ui.

kotcrab avatar kotcrab commented on July 17, 2024

Can't reproduce on fresh project from GDX setup app, also tested with Maven and everything works fine. Probably there is something wrong with your build scripts.

from vis-ui.

StrongJoshua avatar StrongJoshua commented on July 17, 2024

Alright I'll have a look at them after school. Can you post your working build script?

from vis-ui.

kotcrab avatar kotcrab commented on July 17, 2024

https://gist.github.com/kotcrab/8a8d164305c9bee44d35

from vis-ui.

StrongJoshua avatar StrongJoshua commented on July 17, 2024

I checked my build.gradle over and even tried using a clean project, but both showed the error. Maybe the problem is how I am packaging my game. How are you doing it? I just use the Eclipse export function (which worked before I included VisUI).

from vis-ui.

kotcrab avatar kotcrab commented on July 17, 2024

You can't use Eclipse export when using Gradle. See https://github.com/libgdx/libgdx/wiki/Gradle-on-the-Commandline#packaging-for-the-desktop

from vis-ui.

StrongJoshua avatar StrongJoshua commented on July 17, 2024

This is what I had been following: https://github.com/libgdx/libgdx/wiki/Deploying-your-application#deploy-to-windowslinuxmac-os-x Why is this incorrect?

from vis-ui.

kotcrab avatar kotcrab commented on July 17, 2024

It's form old build system, before Gradle was used. That page you linked says: "Note: if using gradle you may prefer following the guidelines provided on this page." It says "prefer" but the new Eclipse project setup page only links to Gradle packaging: https://github.com/libgdx/libgdx/wiki/Gradle-and-Eclipse#packaging-your-project . Looks like Eclipse can't package resources from libs jars for Gradle based projects.

from vis-ui.

StrongJoshua avatar StrongJoshua commented on July 17, 2024

To do this I would need gradle installed and have it in my PATH, correct? Or is there some built-in gradle command line in Eclipse?

from vis-ui.

kotcrab avatar kotcrab commented on July 17, 2024

No, all you need is already in your project directory. You can just run gradlew desktop:dist command from cmd/terminal.

from vis-ui.

StrongJoshua avatar StrongJoshua commented on July 17, 2024

Just as an aside, do you know what the highest java source compatibility I can use is? Because I programmed a lot of things on 1.8, but I think I remember something about android only being able to use 1.6 Is this still the case?

from vis-ui.

kotcrab avatar kotcrab commented on July 17, 2024

Desktop only: 1.8
With android: the safe one is 1.6, you can use 1.7 but not all features are supported.
GWT and iOS: I don't know, 1.6 will definitely work

Please use #libgdx irc for such questions.

from vis-ui.

StrongJoshua avatar StrongJoshua commented on July 17, 2024

Alright, well thanks anyways :)

from vis-ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.