【问题标题】:Why can't I run my app?为什么我不能运行我的应用程序?
【发布时间】:2014-05-24 22:56:41
【问题描述】:

我的应用程序在桌面和 Android 上运行完美,但带有 libgdx 的 robovm 将无法运行。我在我的 Mac 上下载了 ios sdk 并设置了所有内容。当我尝试在 ios 模拟器上运行它时,我得到了这个错误:

An internal error occurred during: "Launching Gravity".
Class com.badlogic.gdx.Gdx doesn't have field gl : com.badlogic.gdx.graphics.GLCommon;
failed to resolve in superclasses and interfaces

我不太确定这有什么问题。这是我的 robovm 启动器的代码。有什么问题吗?

package com.me.Mercify;

import org.robovm.apple.foundation.*;
import org.robovm.apple.uikit.*;
import com.badlogic.gdx.backends.iosrobovm.IOSApplication;
import com.badlogic.gdx.backends.iosrobovm.IOSApplicationConfiguration;

public class RobovmLauncher extends UIApplicationDelegateAdapter {

    protected IOSApplication createApplication() {
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    config.orientationLandscape = true;
    config.orientationPortrait = false;
    return new IOSApplication(new GravityTwist(), config);
    }

    public static void main(String[] args) {
        NSAutoreleasePool pool = new NSAutoreleasePool();
        UIApplication.main(args, null, RobovmLauncher.class);
        pool.close();
    }
}

【问题讨论】:

  • 您使用的是什么 RoboVM 和 LibGDX 版本?
  • @ericn 我正在使用 roboVM 0.0.11 和 libgdx 0.9.9

标签: android ios libgdx simulator robovm


【解决方案1】:

您需要更新到 libGDX 的最新夜间版本,其中包含更新版本的 RoboVM,应该可以解决此错误。 LibGDX 0.9.9 依赖于已经相当过时的 RoboVM 0.0.6。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-07-07
    • 1970-01-01
    • 2021-09-19
    • 2013-02-06
    • 2019-02-23
    • 2021-11-07
    相关资源
    最近更新 更多