MovingBlocks / box2d-editor

Automatically exported from code.google.com/p/box2d-editor - migrated here to maybe maintain together with Destination Sol. Original website:
https://code.google.com/archive/p/box2d-editor/
Apache License 2.0
83 stars 21 forks source link

BodyEditor Libgdx Demo doesn't work, GdxRuntimeException:NoSuchMethodError #25

Closed GoogleCodeExporter closed 7 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Create a Libgdx project and add the loaders of physics-body-editor-2.9.2.zip 
to the libs directory of the project.
2.Replace the source files with the files from bodyeditor-libgdx-demo-2.9.1.zip.
3.Run on Android or Desktop.

What is the expected output? What do you see instead?
I didn't see the result which looks like what physics-body-editor.jar from the 
physics-body-editor-2.9.2 has produced.
Instead, a GdxRuntimeException occurred.

What version of the product are you using? On what operating system?
physics-body-editor-2.9.2.zip
bodyeditor-libgdx-demo-2.9.1.zip
libgdx-nightly-20130430.zip
Windows 8 Enterprise 64 bit

Please provide any additional information below.
Exception in thread "LWJGL Application" 
com.badlogic.gdx.utils.GdxRuntimeException: java.lang.NoSuchMethodError: 
com.badlogic.gdx.utils.JsonReader.parse(Ljava/lang/String;)Ljava/lang/Object;
    at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:116)
Caused by: java.lang.NoSuchMethodError: 
com.badlogic.gdx.utils.JsonReader.parse(Ljava/lang/String;)Ljava/lang/Object;
    at aurelienribon.bodyeditor.BodyEditorLoader.readJson(BodyEditorLoader.java:179)
    at aurelienribon.bodyeditor.BodyEditorLoader.<init>(BodyEditorLoader.java:41)
    at aurelienribon.bodyeditor.App.createBottle(App.java:126)
    at aurelienribon.bodyeditor.App.create(App.java:73)
    at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:130)
    at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:110)

Original issue reported on code.google.com by wy.willi...@gmail.com on 2 May 2013 at 2:27

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/29226598-bodyeditor-libgdx-demo-doesn-t-work-gdxruntimeexception-nosuchmethoderror?utm_campaign=plugin&utm_content=tracker%2F23699865&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F23699865&utm_medium=issues&utm_source=github).
GoogleCodeExporter commented 9 years ago
The same issue in libgdx repository 
https://code.google.com/p/libgdx/issues/detail?id=1418

Original comment by asdani...@gmail.com on 3 May 2013 at 11:02

GoogleCodeExporter commented 9 years ago
Same here - when I switched to the nightly build jars the loader failed.  Same 
trace as above.

Original comment by jmalbane...@gmail.com on 6 May 2013 at 4:55

GoogleCodeExporter commented 9 years ago
Nate refactored the Json reading process: 
http://www.badlogicgames.com/wordpress/?p=2993
It broke the code.

private Model readJson(String str) {
        Model m = new Model();
        OrderedMap<String,?> rootElem = (OrderedMap<String,?>) new JsonReader().parse(str);

That doesnt work anymore.
I need a fix too, gonna try it myself.

Original comment by alchemic...@gmail.com on 6 May 2013 at 1:43

GoogleCodeExporter commented 9 years ago
It's critical bug. Physics Body Editor does not work with libgdx nightlies.

Original comment by swiez9u...@gmail.com on 8 May 2013 at 7:42

GoogleCodeExporter commented 9 years ago
Hello. I fixed that issue. Here is my version of BodyEditorLoader.java
https://gist.github.com/kzudov/5566204
I tested it with some of my shapes and with loader-libgdx-demo.

Original comment by kzudov....@gmail.com on 13 May 2013 at 4:50

Attachments:

GoogleCodeExporter commented 9 years ago
help ...I use this fix but still same error...can anybody help me ??

Original comment by pipu...@gmail.com on 20 May 2013 at 4:36

GoogleCodeExporter commented 9 years ago
@ kzudov, nice it works gr8

Original comment by joker...@gmail.com on 6 Jun 2013 at 5:41

GoogleCodeExporter commented 9 years ago
Thanks for reporting. Being away from the project led to some nasty bugs like 
that. I'll include the provided fix in the source code and will release a new 
version.

Original comment by aurelien.ribon on 1 Oct 2013 at 7:59

GoogleCodeExporter commented 9 years ago
I have tested with kzudov solution and it works fine

Original comment by igor.far...@gmail.com on 11 Oct 2013 at 10:33

GoogleCodeExporter commented 9 years ago
Any update on the new version? kzudov's link is down.

I could do with this tool, got a HUGE world that has a ground sprite that is 
up, down and all over the place, going to be very difficult/time consuming to 
create a fixture for it.

Original comment by Gibson.S...@gmail.com on 11 Dec 2013 at 4:22

GoogleCodeExporter commented 9 years ago
I just updated to libgdx 0.9.9 and I'm facing the same issue. I don't want to 
fix it myself, waiting for the fix.

Original comment by webf...@gmail.com on 12 Dec 2013 at 9:00

GoogleCodeExporter commented 9 years ago
KZUDOV's version in attachement

Original comment by asdani...@gmail.com on 13 Dec 2013 at 6:09

Attachments:

GoogleCodeExporter commented 9 years ago
Here is the original version of kzudov's BodyEditorLoader.java.

Original comment by swiez9u...@gmail.com on 13 Dec 2013 at 7:37

Attachments:

GoogleCodeExporter commented 9 years ago
Thank you so much for this fix! :-)

Original comment by autrel.f...@gmail.com on 26 Feb 2014 at 12:39

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Ohh. I changed my github username, that's why the link was down.
Here's a working link: https://gist.github.com/zudov/5566204

Original comment by kzudov....@gmail.com on 13 Mar 2014 at 12:09

GoogleCodeExporter commented 9 years ago
The BodyEditorLoader.java works great. Thanks =)

Original comment by cavpo...@gmail.com on 5 Apr 2014 at 9:37

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
send your email to jmalbanese@venicecreative.com - I have the fix.

Original comment by jmalbane...@gmail.com on 28 Jun 2014 at 4:38

GoogleCodeExporter commented 9 years ago
I have fixed this and it works fine with LibGDX 1.4.1.  Of course you will need 
to change the package name.  :)

Original comment by bigfoot_...@yahoo.com on 19 Dec 2014 at 9:31

Attachments:

GoogleCodeExporter commented 9 years ago
@bigfoot_software
It works great for me with LibGDX 1.4.1. Thank you so much bro !

Original comment by nhannguy...@gmail.com on 21 Dec 2014 at 5:34

vampcat commented 7 years ago

@Cervator I believe this issue can now be closed, on account of being too outdated to be relevant?

charlmert commented 7 years ago

Thanks! worked for me too