I am developing a libgdx project. I want to deploy the project to android and ios. The project is working on desktop(MacOS) ,android simulator and android device. However, when I try to launch IOS simulators with gradle or main class, errors are throwed. Also I downloaded some another robovm example. These projects can launch simulators with similar code.
Libgdx IOS main class is as follows:
public class IOSLauncher extends IOSApplication.Delegate {
@Override
protected IOSApplication createApplication() {
IOSApplicationConfiguration config = new IOSApplicationConfiguration();
return new IOSApplication(new DemoProject(), config);
}
public static void main(String[] argv) {
NSAutoreleasePool pool = new NSAutoreleasePool();
UIApplication.main(argv, null, IOSLauncher.class);
pool.close();
}
}
Error is as follows:
Exception in thread "main" java.lang.UnsatisfiedLinkError: org.robovm.rt.VM.getStackClasses(II)[Ljava/lang/Class;
at org.robovm.rt.VM.getStackClasses(Native Method)
at org.robovm.rt.bro.Bro.bind(Bro.java:50)
at org.robovm.objc.ObjCRuntime.<clinit>(ObjCRuntime.java:43)
at org.robovm.objc.ObjCObject.<clinit>(ObjCObject.java:57)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:186)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:122)
In fact, I prefer to run gradle.
But it throws error is as follows:
Executing external task 'launchIPhoneSimulator'...
Configuration on demand is an incubating feature.
:core:compileJava UP-TO-DATE
:core:processResources UP-TO-DATE
:core:classes UP-TO-DATE
:core:jar UP-TO-DATE
:ios:compileJava UP-TO-DATE
:ios:processResources UP-TO-DATE
:ios:classes UP-TO-DATE
:ios:jar UP-TO-DATE
:ios:assemble UP-TO-DATE
:ios:compileTestJava UP-TO-DATE
:ios:processTestResources UP-TO-DATE
:ios:testClasses UP-TO-DATE
:ios:test UP-TO-DATE
:ios:check UP-TO-DATE
:ios:build UP-TO-DATE
:ios:launchIPhoneSimulator FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':ios:launchIPhoneSimulator'.
> Failed to launch IOS Simulator
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 0.743 secs
/Users/burakdagli/.m2/repository/org/robovm/robovm-dist/1.2.0/unpacked/robovm-1.2.0/bin does not exist.
14:34:13: External task execution finished 'launchIPhoneSimulator'.
How can I proceed?