【问题标题】:Hello world app with libgdx & RoboVM not running on iOS - ArrayIndexOutOfBoundsException带有 libgdx 和 RoboVM 的 Hello world 应用程序未在 iOS 上运行 - ArrayIndexOutOfBoundsException
【发布时间】:2013-10-23 08:23:24
【问题描述】:

我第一次尝试为 iOS 运行 libgdx 应用程序。我正在使用 setup-ui 生成的 hello world 应用程序,并尝试使用 robo-vm 在 iPhone 模拟器上运行它。当我尝试运行应用程序时,我收到以下消息:

在“启动 my-gdx-game-robovm”期间发生内部错误

这是错误日志:

!ENTRY org.eclipse.core.jobs 4 2 2013-10-23 11:12:02.701 !MESSAGE 一个 在“启动 my-gdx-game-robovm”期间发生内部错误。 !堆 0 java.lang.ArrayIndexOutOfBoundsException:-1 在 java.util.ArrayList.get(ArrayList.java:324) 在 org.robovm.compiler.target.ios.IOSTarget.init(IOSTarget.java:497) 在 org.robovm.compiler.config.Config.build(Config.java:463) 在 org.robovm.compiler.config.Config.access$3700(Config.java:67) 在 org.robovm.compiler.config.Config$Builder.build(Config.java:909) 在 org.robovm.eclipse.internal.IOSSimulatorLaunchConfigurationDelegate.configure(IOSSimulatorLaunchConfigurationDelegate.java:59) 在 org.robovm.eclipse.internal.AbstractLaunchConfigurationDelegate.launch(AbstractLaunchConfigurationDelegate.java:143) 在 org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:858) 在 org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:707) 在 org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1018) 在 org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1222) 在 org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

运行桌面应用程序正常。

请注意,虽然我读到我需要一个开发者帐户才能在 iOS 上使用 libgdx(我是 iOS 开发新手),但我没有,但我认为上面的错误不能反映这一点。

提前感谢您的帮助。

【问题讨论】:

    标签: ios eclipse libgdx robovm


    【解决方案1】:

    原因很可能是您尚未同意 Xcode 条款。请打开 Xcode 一次或从终端运行 sudo xcrun clang

    如果您已经同意条款,另一个原因可能是xcode-select 没有指向正确的路径。在终端中运行xcode-select -print-path 以查看当前路径。使用sudo xcode-select -switch <path>更改指向的路径。

    下一个版本的 RoboVM (0.0.6) 将在出现这些问题时显示更多有用的错误消息。

    【讨论】:

    • 原因是 xcode 位置,这是正确的。出于某种原因,只是改变了路径并没有削减它,我实际上必须从市场上重新安装 XCode(我把它作为 dmg)才能工作。顺便说一句,非常感谢您的工作!
    猜你喜欢
    • 1970-01-01
    • 2017-02-06
    • 2018-11-26
    • 2014-05-06
    • 2020-05-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-04-30
    相关资源
    最近更新 更多