[Libgdx] java.lang.VerifyError

I started making this little toy of mine which was supposed to be playable on desktop and mobile devices (IKR GENIUS!).

Everything was going pretty smoothly, until yesterday I tried to run my toy on android emulator and android device. On both cases, I get this error:


07-02 12:01:29.040: E/AndroidRuntime(859): FATAL EXCEPTION: GLThread 51
07-02 12:01:29.040: E/AndroidRuntime(859): Process: com.cig.dreams.android, PID: 859
07-02 12:01:29.040: E/AndroidRuntime(859): java.lang.VerifyError: com/guit/core/GJsonObject
07-02 12:01:29.040: E/AndroidRuntime(859): 	at com.cig.dreams.views.GameView.<init>(GameView.java:10)
07-02 12:01:29.040: E/AndroidRuntime(859): 	at com.cig.dreams.Game.<init>(Game.java:46)
07-02 12:01:29.040: E/AndroidRuntime(859): 	at com.cig.dreams.GameApplication.create(GameApplication.java:22)
07-02 12:01:29.040: E/AndroidRuntime(859): 	at com.badlogic.gdx.backends.android.AndroidGraphics.onSurfaceChanged(AndroidGraphics.java:236)
07-02 12:01:29.040: E/AndroidRuntime(859): 	at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1512)
07-02 12:01:29.040: E/AndroidRuntime(859): 	at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)


I did some googling, and I found out that it has to do something like compiled classes having different signature (or something like that) than run time classes. As I’m completely green in dealing with problems like these, I thought maybe someone has already solved this problem.

Here is the GJsonObject.java class:
http://www.java-gaming.org/?action=pastebin&id=999

This is essentially a wrapper for this library. (I downloaded the json-smart-1.2.jar file)
https://code.google.com/p/json-smart/
This class is essentially a convenience class for easier use of json-smart.

I’m gonna explain my project setup, as it may be causing this issue, but I tried moving things around, and it didn’t seem to fix the issue.

In my workspace, I have 6 projects:
static final @ = “your project name”

  1. @ : not quite sure what this is used for
  2. @-android
  3. @-core
  4. @-desktop
  5. @-html
  6. Guit : game UI system thingy (only source code and json smart jar added to class path)

I haven’t touched @, @-android, @-html and @-desktop at all. I added source code folder to @-core from Guit. I also added the json-smart library to class path to the @-core project.

Any ideas would be appreciated…