문제

My app runs perfect for desktop and Android, but robovm with libgdx will not work. I downloaded the ios sdk on my mac and got everything set up. When I try to run it on the ios simulator, I get this error:

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

I am not quite sure what is wrong with this. here is my code for my robovm launcher. Is there something wrong with it?

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();
    }
}
도움이 되었습니까?

해결책

You need to update to the latest nightly build of libGDX, which contains an updated version of RoboVM which should resolve this error. LibGDX 0.9.9 depends on RoboVM 0.0.6, which is fairly outdated.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top