[Interest] Qt 5.14 & android: application doesn't start

Alexander Ivash elderorb at gmail.com
Tue Jan 7 11:01:49 CET 2020


Thanks a lot Jerome!

Hope it will be fixed for 5.14.1.

пн, 6 янв. 2020 г. в 22:15, Jérôme Godbout <godboutj at amotus.ca>:
>
> Android in 5.14.0 is borken do not use for release to Play Store.
>
> https://bugreports.qt.io/browse/QTBUG-80713?focusedCommentId=490024&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-490024
>
> There is also modification to the AndroidManifest.xml required. We had a thread of this on QtMob slack channel, but here is the highlight I did find (copy from slack):
>
> This tag have been added to the AndroidManifest.xml for 5.14.0:
> <meta-data android:value="@string/unsupported_android_version" android:name="android.app.unsupported_android_version"/>
> I will try to add it on my application too.
> This seem to be gone:
> <meta-data android:name="android.app.bundled_in_lib_resource_id" android:resource="@array/bundled_in_lib"/>
> <meta-data android:name="android.app.bundled_in_assets_resource_id" android:resource="@array/bundled_in_assets"/>
> <meta-data android:name="android.app.load_local_libs" android:value="-- %%INSERT_LOCAL_LIBS%% --"/>
> this have been replaced by this:
> <meta-data android:name="android.app.load_local_libs_resource_id" android:resource="@array/load_local_libs"/>
> The value is now default (was added, I was using full):
> <meta-data android:name="android.app.extract_android_style" android:value="default"/>
> The activity tag configChanges also added:
> mcc|mnc|density
> The application tag also have this more:
> android:extractNativeLibs="true"
>
>
> This is Niels Mayer solution to select a different AndroidManifest for 5.14.0 or above:
>
> ## For Android and Qt>=5.14 AndroidManifest.xml is incompatible with old version, thus need
>    ## Separate "android-newqt/AndroidManifest.xml" for Qt>=5.14
>    ## See https://bugreports.qt.io/browse/QTBUG-80444 for details.
>    equals(QT_MAJOR_VERSION, 5):greaterThan(QT_MINOR_VERSION,13) { ##Android with Qt>=5.14
>      message("Using 'android-newqt/' as ANDROID_PACKAGE_SOURCE_DIR...")
>      DISTFILES += \
>        android-newqt/AndroidManifest.xml \
>        android-newqt/build.gradle \
>        android-newqt/gradle/wrapper/gradle-wrapper.jar \
>        android-newqt/gradle/wrapper/gradle-wrapper.properties \
>        android-newqt/gradlew \
>        android-newqt/gradlew.bat \
>        android-newqt/res/values/libs.xml
>      ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android-newqt
>    }
>    ## For Android and Qt<5.14 AndroidManifest.xml is incompatible with new version, thus need
>    ## Separate "android-oldqt/AndroidManifest.xml" for Qt<5.14
>    else {
>      message("Using 'android-oldqt/' as ANDROID_PACKAGE_SOURCE_DIR...")
>      DISTFILES += \
>        android-oldqt/AndroidManifest.xml \
>        android-oldqt/build.gradle \
>        android-oldqt/gradle/wrapper/gradle-wrapper.jar \
>        android-oldqt/gradle/wrapper/gradle-wrapper.properties \
>        android-oldqt/gradlew \
>        android-oldqt/gradlew.bat \
>        android-oldqt/res/values/libs.xml
>      ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android-oldqt
>    }
> } (edited)
>
> -----Original Message-----
> From: Interest <interest-bounces at qt-project.org> On Behalf Of Alexander Ivash
> Sent: January 6, 2020 2:10 PM
> To: interestqt-project.org <interest at qt-project.org>
> Subject: [Interest] Qt 5.14 & android: application doesn't start
>
> Is it just me or this is known issue? Is there known workaround?
>
> W ResourceType: No package identifier when getting name for resource number 0x00000000
>
> W ResourceType: No package identifier when getting name for resource number 0x00000000
>
> W ResourceType: Invalid package identifier when getting bag for resource number 0x00000000
>
> I zygote64: Do partial code cache collection, code=29KB, data=18KB
>
> I zygote64: After code cache collection, code=29KB, data=18KB
>
> I zygote64: Increasing code cache capacity to 128KB
>
> E Qt : Can't create main activity
>
> E Qt : android.content.res.Resources$NotFoundException: String array resource ID #0x0
>
> E Qt : at android.content.res.Resources.getStringArray(Resources.java:589)
>
> E Qt : at android.content.res.MiuiResources.getStringArray(MiuiResources.java:160)
>
> E Qt : at org.qtproject.qt5.android.bindings.QtLoader.startApp(QtLoader.java:423)
>
> E Qt : at org.qtproject.qt5.android.bindings.QtActivityLoader.onCreate(QtActivityLoader.java:183)
>
> E Qt : at org.qtproject.qt5.android.bindings.QtActivity.onCreateHook(QtActivity.java:266)
>
> E Qt : at org.qtproject.qt5.android.bindings.QtActivity.onCreate(QtActivity.java:273)
>
> E Qt : at squaltech.com.RootActivity.onCreate(RootActivity.java:56)
>
> E Qt : at android.app.Activity.performCreate(Activity.java:7084)
>
> E Qt : at android.app.Activity.performCreate(Activity.java:7075)
>
> E Qt : at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1215)
>
> E Qt : at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2767)
>
> E Qt : at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892)
>
> E Qt : at android.app.ActivityThread.-wrap11(Unknown Source:0)
>
> E Qt : at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1613)
>
> E Qt : at android.os.Handler.dispatchMessage(Handler.java:106)
>
> E Qt : at android.os.Looper.loop(Looper.java:176)
>
> E Qt : at android.app.ActivityThread.main(ActivityThread.java:6635)
>
> E Qt : at java.lang.reflect.Method.invoke(Native Method)
>
> E Qt : at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
>
> E Qt : at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823)
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest


More information about the Interest mailing list