0

I have run the "hello world cocoa" example from the robovm official site successfully. But when I run the libgdx robovm demo, while it compiles OK, it fails with a runtime error. I have followed every step of the wiki. Do you have any advice?

[debug] IOSApplication: View: Portrait 320x480
[debug] IOSGraphics: 320.0x480.0, 1.0
[debug] IOSGraphics: Calculating density, UIScreen.mainScreen.scale: 1.0
[debug] IOSGraphics: Display: ppi=163, density=1.0

Exception in thread "main" java.lang.UnsatisfiedLinkError: Failed to resolve native function for method private static native org.robovm.cocoatouch.uikit.UIAccelerometer org.robovm.cocoatouch.uikit.UIAccelerometer.objc_getSharedAccelerometer(org.robovm.objc.ObjCClass,org.robovm.objc.Selector) with bridge annotation @org.robovm.rt.bro.annotation.Bridge(symbol=) in library @org.robovm.rt.bro.annotation.Library(value=UIKit)
at org.robovm.rt.bro.Runtime.resolveBridge(Runtime.java)
at org.robovm.rt.bro.Bro.bind(Bro.java)
at org.robovm.objc.ObjCRuntime.bind(ObjCRuntime.java)
at org.robovm.cocoatouch.uikit.UIAccelerometer.<clinit>(UIAccelerometer.java)
at com.badlogic.gdx.backends.iosrobovm.IOSInput.setupAccelerometer(IOSInput.java)
at com.badlogic.gdx.backends.iosrobovm.IOSInput.setupPeripherals(IOSInput.java)
at com.badlogic.gdx.backends.iosrobovm.IOSApplication.didFinishLaunching(IOSApplication.java)
at com.badlogic.gdx.backends.iosrobovm.IOSApplication$Delegate.didFinishLaunching(IOSApplication.java)
at org.robovm.cocoatouch.uikit.UIApplicationDelegate$Callbacks.didFinishLaunching(UIApplicationDelegate.java)
at org.robovm.cocoatouch.uikit.UIApplication.UIApplicationMain(Native Method)
at org.robovm.cocoatouch.uikit.UIApplication.main(UIApplication.java)
at com.badlogicgames.superjumper.SuperJumperIOS.main(SuperJumperIOS.java)
P.T.
  • 24,557
  • 7
  • 64
  • 95
  • Precisely which robovm and libgdx versions are you using? The Libgdx robovm support is very, very recent. – P.T. Jul 21 '13 at 18:23

1 Answers1

0

The libgdx RoboVM backend only works properly with the latest nightly build of RoboVM and from the stacktrace you posted I guess you're using an older version. Please try the latest build from http://download.robovm.org.

ntherning
  • 1,160
  • 7
  • 8