Closed isokolovskii closed 6 years ago
Same as Issue #18
Problem looks like a bug in Qt 5.11.0 due to jni_onLoad no being called like ever. Workaround is to add to main activity onCreate function call to System.loadLibrary. Name of library is eventually name of your target set in .pro file. So it's like System.loadLibrary("TargetName").
Mark issue as closed due to found workaround fix.
After installing package via qpm with install instructions provided and adding SystemDispatcher.dispatch call in my custom main activity I get runtime error:
E AndroidRuntime: java.lang.UnsatisfiedLinkError: No implementation found for void androidnative.SystemDispatcher.jniEmit(java.lang.String, java.util.Map) (tried Java_androidnative_SystemDispatcher_jniEmit and Java_androidnative_SystemDispatcher_jniEmit__Ljava_lang_String_2Ljava_util_Map_2) E AndroidRuntime: at androidnative.SystemDispatcher.jniEmit(Native Method) E AndroidRuntime: at androidnative.SystemDispatcher.emit(SystemDispatcher.java:161) E AndroidRuntime: at androidnative.SystemDispatcher.dispatch(SystemDispatcher.java:66) E AndroidRuntime: at androidnative.SystemDispatcher.dispatch(SystemDispatcher.java:40) E AndroidRuntime: at ru.maxnet.activity.MyActivity.onCreate(MyActivity.java:29) E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:7023) E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:7014) E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1215) E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2745) E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2870) E AndroidRuntime: at android.app.ActivityThread.-wrap11(Unknown Source:0) E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1601) E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106) E AndroidRuntime: at android.os.Looper.loop(Looper.java:172) E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6590) E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
I am using Qt 5.11.0, android SDK 27 and running it on armv-7a arch device. Need a helping hand with fixing it as for now nothing I found doing wrong.