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