I had a hard time to compile with Openfl 9.4.0, Lime 8.2.1 and SDK > 34 :
Finally I can compile for Android but all my apps crash with Lime 8.2.1. 8.1.3 works fine. Does anyone got Lime 8.2.1 to work on Android?
Which Android NDK version are you using? For reference, Lime 8.2.1 was built with NDK r21e (21.4.7075529).
Which hxcpp version are you using?
NDK 23.2.8568313 and hxcpp from GIT
Crash report from Play Store:
No pending exception expected: java.lang.NoSuchMethodError: no static or non-static method “Lorg/libsdl/app/SDLActivity;.onNativeSoftReturnKey()Z”
at java.lang.String java.lang.Runtime.nativeLoad(java.lang.String, java.lang.ClassLoader, java.lang.Class) (Runtime.java:-2)
at java.lang.String java.lang.Runtime.nativeLoad(java.lang.String, java.lang.ClassLoader) (Runtime.java:1121)
at void java.lang.Runtime.loadLibrary0(java.lang.ClassLoader, java.lang.Class, java.lang.String) (Runtime.java:1075)
at void java.lang.Runtime.loadLibrary0(java.lang.Class, java.lang.String) (Runtime.java:998)
at void java.lang.System.loadLibrary(java.lang.String) (System.java:1656)
at void v1.a.c(java.lang.String) (SourceFile:1)
at void org.libsdl.app.SDLActivity.m() (SourceFile:1)
at void org.libsdl.app.SDLActivity.onCreate(android.os.Bundle) (SourceFile:-1)
at void u1.a.onCreate(android.os.Bundle) (SourceFile:1)
at void android.app.Activity.performCreate(android.os.Bundle, android.os.PersistableBundle) (Activity.java:8050)
at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:8030)
at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1329)
at void androidx.test.runner.MonitoringInstrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (MonitoringInstrumentation.java:2)
at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:3608)
at android.app.Activity android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.app.servertransaction.PendingTransactionActions, android.content.Intent) (ActivityThread.java:3792)
at void android.app.servertransaction.LaunchActivityItem.execute(android.app.ClientTransactionHandler, android.os.IBinder, android.app.servertransaction.PendingTransactionActions) (LaunchActivityItem.java:103)
at void android.app.servertransaction.TransactionExecutor.executeCallbacks(android.app.servertransaction.ClientTransaction) (TransactionExecutor.java:135)
at void android.app.servertransaction.TransactionExecutor.execute(android.app.servertransaction.ClientTransaction) (TransactionExecutor.java:95)
at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:2210)
at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:106)
at boolean android.os.Looper.loopOnce(android.os.Looper, long, int) (Looper.java:201)
at void android.os.Looper.loop() (Looper.java:288)
at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:7839)
at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:548)
at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:1003)
I can successfully build and run on one of my Android devices with the following configuration.
OpenFL 9.4.0
Lime 8.2.1
hxpp git
Haxe 4.3.6
Android SDK API 35
Android NDK 25.2.9519653
Finally it works. Then problem was Lime 8,2.1 from haxelib. Did not work. I pulled the Git version and this one works.
How did you compile for API 35? I got an error, caused by gradle. Had to upgrade to
<config:android gradle-version=“8.6” />
<config:android gradle-plugin=“8.4.2” />
and this version asks for NDK 26.1.10909125
So my setup
Android NDK 26.1.10909125
Android SDK 35
Lime from GIT
hxcpp from GIT
OpenFL 9.4.0
Haxe 4.3.6
Gradle 8.6 / AGP 8.4.2
Strange. I tested using Lime 8.2.1 from Haxelib, and I didn’t do anything special to compile for API 35. I had no <config:android>
tags in my project.xml.