为什么我不能运行我的应用程序?

时间:2014-04-11 00:35:55

标签: android ios libgdx simulator robovm

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

1 个答案:

答案 0 :(得分:1)

您需要更新到最新的每晚构建的libGDX,其中包含RoboVM的更新版本,可以解决此错误。 LibGDX 0.9.9依赖于RoboVM 0.0.6,这已经过时了。