无法在libgdx项目中启动ipad-iphone模拟器

时间:2015-05-30 11:36:43

标签: libgdx ios-simulator robovm

我正在开发一个libgdx项目。我想将项目部署到android和ios。该项目正在桌面(MacOS),Android模拟器和Android设备上工作。但是,当我尝试使用gradle或main类启动IOS模拟器时,会抛出错误。我还下载了另一个robovm示例。这些项目可以启动具有类似代码的模拟器。

Libgdx IOS主类如下:

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();
}
}

错误如下:

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)

事实上,我更喜欢使用gradle。

enter image description here

但它抛出的错误如下:

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'.

我该怎么办?

0 个答案:

没有答案