Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Libgdx for iOS with RoboVM - Unsatisfied link error at IOSGLES20.init

Tags:

ios

libgdx

robovm

Trying to port my LibGDX game to iOS using RoboVM.

When running the app for the emulator I get this error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: 
at com.badlogic.gdx.backends.iosrobovm.IOSGLES20.init(Native Method)
at com.badlogic.gdx.backends.iosrobovm.IOSGLES20.<init>(IOSGLES20.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 ***********
like image 530
Bogdan Alexandru Avatar asked Feb 17 '14 13:02

Bogdan Alexandru


1 Answers

Ok, sounds like you might have done an upgrade to libGDX 1.6.1+

Look in your main build.gradle file for lines that read as follows:

natives "com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios"
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-ios"

If you have such lines change them to read (changes natives to compile):

compile "com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios"
compile "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-ios"

And see if that fixes the issue.

I just went through several hours not realizing that I had missed a step during update to a newer libGDX and that roboVM is no longer including the bins as part of the ipa build as they are now packaged as JAR's that get sucked in via compile. (no more lib entries in the robovm.xml for these either)

like image 145
Michael Joyner Avatar answered Nov 13 '22 19:11

Michael Joyner