Packaging QT application into Android App Bundle (AAB)

In Qt Creator 4.11.0 on Projects page check “Build .aab”:

This will create .aab file.

Uploading AAB to Google Play

Export your private key from your key store to an encrypted file:

set PATH=%PATH%;"C:\Program Files\Android\Android Studio\jre\bin"
java.exe -jar C:\Users\D-Ef\Downloads\pepk.jar --keystore=android_release.keystore --alias=linesgame --output=encrypted_private_key --encryptionkey=eb10fe8f7c7c9df715022017b00c6471f8ba8170b13049a11e6c09ffe3056a104a3bbe4ac5a955f4ba4fe93fc8cef27558a3eb9d2a529a2092761fb833b656cd48b9de6a

upload this file on Release Management->App Signing page of Google Play Console and then upload your AAB.

QT Bugs

There is a bug in QT 5.14.1 that prevents AAB from being loaded, but it has a workaround:

android {
    ...
    defaultConfig {
        resConfigs "en"
    }
}

And there is another bug in QT 5.14.0 and QT 5.14.1 that prevents the application from starting on Android 9 and 10:

until this bug is fixed the only solution so far is to upload APK instead of ABB.

Links

  • Deploying an Application on Android: Applications on Android can be packaged in two ways: Either as Application Package (APK) or Android App Bundle (AAB). Both are ZIP files which follow a predefined directory structure. The difference between the two is that APK files can be downloaded to and executed on a device. AAB, on the other hand, is intended to be interpreted by the Google Play store and is used to generate APK files.

Leave a Reply

Your email address will not be published.