我的应用程序非常适合台式机和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();
    }
}

最佳答案

您需要更新为libGDX的最新夜间版本,该版本包含RoboVM的更新版本,该版本应可以解决此错误。 LibGDX 0.9.9取决于RoboVM 0.0.6,这已经过时了。

关于android - 为什么我不能运行我的应用程序?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/23001528/

10-09 07:38