David Xia
David Xia

Reputation: 31

Robovm: java.lang.NoClassDefFoundError: org/robovm/objc/$M

I have a problem every time I run my app that was built using libgdx/robovm. The build succeeds, but every time I open the app, I get the following stack trace:

java.lang.NoClassDefFoundError: org/robovm/objc/$M
    at org.robovm.apple.foundation.NSObject.init(NSObject.java)
    at org.robovm.apple.foundation.NSObject.<init>(NSObject.java)
    at org.robovm.apple.foundation.NSAutoreleasePool.<init>(NSAutoreleasePool.java)
    at my.app.IOSLauncher.main(IOSLauncher.java)

I'm using the latest versions of robovm, Xcode, and JDK 8.

Any idea why this happens?

Upvotes: 3

Views: 515

Answers (2)

bddckr
bddckr

Reputation: 1392

I had the same problem after updating RoboVM in Eclipse to version 1.2.0.

Setting roboVMVersion to 1.2.0 in the libgdx project's main build.gradle file fixed it. Make sure to do Gradle > Refresh All on your projects in Eclipse afterwards.

Upvotes: 2

Khartraxx
Khartraxx

Reputation: 21

I'm not sure what caused this exception, but updating to LibGDX 1.6.0 and RoboVM 1.2.0 solved this issue for me.

Upvotes: 2

Related Questions