Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.16, 6.6.2
-
-
2024wk50s3FOQtforAndroid
Description
No particular reproducer provided since the issue is about building tool itself. Any arbitrary project can be used for testing.
When building for multiple ABIs, it's possible to split APKs, i.e. one APK for one ABI instead of a single "integrated" APK for all ABIs. It is done by:
1. Specify ANDROID_ABIS or QT_ANDROID_ABIS depending on if one's using Qt5 or Qt6
2. Add the following entry to build.gradle (v7a and v8a for instance) to android section:
splits { abi { enable true reset() include "armeabi-v7a", "arm64-v8a" universalApk false } }
The problem is that under Release mode, they cannot be signed due to errors:
Unable to open 'D:/build-Android_playground-Android_Qt_6_6_2_Clang_arm64_v8a-Release/android-build//build/outputs/apk/release/android-build-release-unsigned.apk' for verification Unable to open 'D:/build-Android_playground-Android_Qt_6_6_2_Clang_arm64_v8a-Release/android-build//build/outputs/apk/release/android-build-release-unsigned.apk' as zip archive zipalign command failed.
A guess about the reason:
Implementation of the packagePath method in androiddeployqt. There is no accounting for the additional target ABI string in the resulting APK filenames in this method and so the signing process fails. As above, the zipalign command expects a file called android-build-release-unsigned.apk when the file is actually called android-build-<TARGET_ABI>-release-unsigned.apk
Attachments
Issue Links
- is covered by
-
QTBUG-113996 Re-factor androiddeployqt
- Open
- relates to
-
QTBUG-77172 Make androiddeployqt respect gradle's productFlavors options, which lead to failure of zipalign invokation
- Open