Hi,
I meet an error when start with Kotlin. Please give me a hand. thank you.
java.lang.IncompatibleClassChangeError:
Process finished with exit code 1
Kotlin code:
import com.badlogic.gdx.backends.iosrobovm.IOSApplication
import com.badlogic.gdx.backends.iosrobovm.IOSApplicationConfiguration
import org.robovm.apple.foundation.NSAutoreleasePool
import org.robovm.apple.uikit.UIApplication
import sample.KotlinSample
class IOSKotlinLauncher : IOSApplication.Delegate() {
protected override fun createApplication(): IOSApplication { val config = IOSApplicationConfiguration() return IOSApplication(KotlinSample(), config) } public fun main(argv: Array<String>) : Unit { val pool = NSAutoreleasePool() UIApplication.main<UIApplication, IOSKotlinLauncher>(argv, null, IOSKotlinLauncher::class.java) pool.close() }
}
Java code:
import org.robovm.apple.foundation.NSAutoreleasePool;
import org.robovm.apple.uikit.UIApplication;
import com.badlogic.gdx.backends.iosrobovm.IOSApplication;
import com.badlogic.gdx.backends.iosrobovm.IOSApplicationConfiguration;
import sample.KotlinSample;
public class IOSLauncher extends IOSApplication.Delegate {
@Override
protected IOSApplication createApplication() {
IOSApplicationConfiguration config = new IOSApplicationConfiguration();
return new IOSApplication(new KotlinSample(), config);
}
public static void main(String[] argv) { NSAutoreleasePool pool = new NSAutoreleasePool(); UIApplication.main(argv, null, IOSLauncher.class); pool.close(); }
}