Qt 5.14.2: Android application crashed. Why?
-
Hello all!
I've got this error on Qt Android application:W/System.err(24004): java.lang.Exception: W/System.err(24004): at org.qtproject.qt5.android.bindings.QtLoader.loadApplication(QtLoader.java:268) W/System.err(24004): at org.qtproject.qt5.android.bindings.QtLoader.startApp(QtLoader.java:505) W/System.err(24004): at org.qtproject.qt5.android.bindings.QtActivityLoader.onCreate(QtActivityLoader.java:166) W/System.err(24004): at org.qtproject.qt5.android.bindings.QtActivity.onCreateHook(QtActivity.java:266) W/System.err(24004): at org.qtproject.qt5.android.bindings.QtActivity.onCreate(QtActivity.java:273) W/System.err(24004): at android.app.Activity.performCreate(Activity.java:6147) W/System.err(24004): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1112) W/System.err(24004): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2498) W/System.err(24004): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2625) W/System.err(24004): at android.app.ActivityThread.access$700(ActivityThread.java:183) W/System.err(24004): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1484) W/System.err(24004): at android.os.Handler.dispatchMessage(Handler.java:111) W/System.err(24004): at android.os.Looper.loop(Looper.java:194) W/System.err(24004): at android.app.ActivityThread.main(ActivityThread.java:5667) W/System.err(24004): at java.lang.reflect.Method.invoke(Native Method) W/System.err(24004): at java.lang.reflect.Method.invoke(Method.java:372) W/System.err(24004): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:962) W/System.err(24004): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:757)
It's perfectly working on iOS and MacOS but crashed on Android. Why? Is it next of Qt Android bugs?
I ma running it on Qt 5.14.2 on MacOS. -
Have you used this app on Android in Qt < 5.14? If yes, then you need to regenerate your templates. Backup and remove your android dir (from your project), then in Qt Creator go to Project->Build->Build Android APK->Create Templates. Do a full rebuild and try if that works. If yes, then you can adjust your Android manifest etc. to match your old config.
-
Have you used this app on Android in Qt < 5.14? If yes, then you need to regenerate your templates. Backup and remove your android dir (from your project), then in Qt Creator go to Project->Build->Build Android APK->Create Templates. Do a full rebuild and try if that works. If yes, then you can adjust your Android manifest etc. to match your old config.
@sierdzio I have list of prototyped applications that is using by me like test pool for Qt, it's about 20 applications. They have been developing for older Qt versions. Thx, updated all files from scratch. It's working now. But not Qt Test application. When run tests I have this
E/art (24318): No implementation found for int[] org.qtproject.qt5.android.ExtractStyle.extractNativeChunkInfo20(long) (tried Java_org_qtproject_qt5_android_ExtractStyle_extractNativeChunkInfo20 and Java_org_qtproject_qt5_android_ExtractStyle_extractNativeChunkInfo20__J) W/System.err(24318): java.lang.reflect.InvocationTargetException W/System.err(24318): at java.lang.reflect.Method.invoke(Native Method) W/System.err(24318): at java.lang.reflect.Method.invoke(Method.java:372) W/System.err(24318): at org.qtproject.qt5.android.bindings.QtLoader.loadApplication(QtLoader.java:267) W/System.err(24318): at org.qtproject.qt5.android.bindings.QtLoader.startApp(QtLoader.java:505) W/System.err(24318): at org.qtproject.qt5.android.bindings.QtActivityLoader.onCreate(QtActivityLoader.java:166) W/System.err(24318): at org.qtproject.qt5.android.bindings.QtActivity.onCreateHook(QtActivity.java:266) W/System.err(24318): at org.qtproject.qt5.android.bindings.QtActivity.onCreate(QtActivity.java:273) W/System.err(24318): at android.app.Activity.performCreate(Activity.java:6147) W/System.err(24318): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1112) W/System.err(24318): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2498) W/System.err(24318): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2625) W/System.err(24318): at android.app.ActivityThread.access$700(ActivityThread.java:183) W/System.err(24318): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1484) W/System.err(24318): at android.os.Handler.dispatchMessage(Handler.java:111) W/System.err(24318): at android.os.Looper.loop(Looper.java:194) W/System.err(24318): at android.app.ActivityThread.main(ActivityThread.java:5667) W/System.err(24318): at java.lang.reflect.Method.invoke(Native Method) W/System.err(24318): at java.lang.reflect.Method.invoke(Method.java:372) W/System.err(24318): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:962) W/System.err(24318): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:757) W/System.err(24318): Caused by: java.lang.UnsatisfiedLinkError: No implementation found for int[] org.qtproject.qt5.android.ExtractStyle.extractNativeChunkInfo20(long) (tried Java_org_qtproject_qt5_android_ExtractStyle_extractNativeChunkInfo20 and Java_org_qtproject_qt5_android_ExtractStyle_extractNativeChunkInfo20__J) W/System.err(24318): at org.qtproject.qt5.android.ExtractStyle.extractNativeChunkInfo20(Native Method) W/System.err(24318): at org.qtproject.qt5.android.ExtractStyle.findPatchesMarings(ExtractStyle.java:796) W/System.err(24318): at org.qtproject.qt5.android.ExtractStyle.getDrawable(ExtractStyle.java:1130) W/System.err(24318): at org.qtproject.qt5.android.ExtractStyle.extractViewInformations(ExtractStyle.java:1234) W/System.err(24318): at org.qtproject.qt5.android.ExtractStyle.extractTextAppearanceInformations(ExtractStyle.java:1327) W/System.err(24318): at org.qtproject.qt5.android.ExtractStyle.<init>(ExtractStyle.java:2003) W/System.err(24318): at org.qtproject.qt5.android.QtActivityDelegate.loadApplication(QtActivityDelegate.java:614) W/System.err(24318): ... 20 more
Why is that?
-
Hm I think I've seen it but I don't remember how I solved it. I think I had to tweak the API level (NDK, SDK minimal or target), but not sure.
That's Qt for Android in a nutshell: tweak it until it works, then pray Google won't change the APIs again.
-
Hm I think I've seen it but I don't remember how I solved it. I think I had to tweak the API level (NDK, SDK minimal or target), but not sure.
That's Qt for Android in a nutshell: tweak it until it works, then pray Google won't change the APIs again.
-
I'd rather try setting it higher first.