AAB Support in Qt for Android
Starting with Qt 5.14.0 beta2, users will notice that there are a lot fewer Qt for Android distributions than in previous versions. But don't panic: All the usual target architectures are still available! Instead of distributing a single package for each target ABI, we now have one larger package that covers all the ones we support: arm64-v8a, armv7a, x86 and x86-64.
For users building from source, the new default is also to build for all target ABIs in one go.
The reason for this is that Google Play is moving away from requiring the upload of multiple publisher-signed APK packages. Instead, the recommended form of distribution now is the new AAB format: An unsigned package that contains all supported target ABIs in one. Based on this, the app store will generate signed APKs that are suitable and optimized for the device issuing the request.
Qt 5.14.0 still supports building APKs, both for release and for local testing, and both with just a single architecture or with multiple if that is your preference. But starting with Qt 5.14.0 we will also support AAB, making the release process a little bit simpler for developers and aligning with the recommendations made by Google. (Thanks, Bogdan Vatra from KDAB for doing this work!)
We think this should be great news for those of you doing Android development with Qt, but since this is a rather significant change, it may also imply a little bit of work for some users, especially those of you who have CI and distribution scripts running, so I wanted to give a heads-up.
First of all: Qt Creator 4.10 and earlier versions will not work together with Qt 5.14.0 and later if you are targeting Android. Qt Creator 4.11 is currently in beta and will be released at the same time as Qt 5.14, so make sure you have that before testing. Command-line building and packaging with androiddeployqt still works as before.
The other thing to keep in mind is that file names of plugins and libraries have all changed to include the target ABI as a suffix. This is in order for the files to co-exist in the same Qt installation, and it may require some changes to packaging scripts or test automation.
As a related change, Bogdan has also altered how plugins are loaded and how additional QML files are bundled together with the app. In previous versions, plugins and QML imports would be unpacked into the directory structure expected by Qt, duplicating some data and adding to the start-up time the first time the app is run. Since Qt 5.14.0, the plugins will now be loaded from the libs directory of the APK directly. In addition, the QML files, which were previously distributed in assets and unpacked together with the plugins, will be included in a Qt resource file that is automatically added to the resource system when the application is launched.
For most applications this should not have any impact, but if you are changing any of the standard Qt binding code, then you may have to adapt it to account for this.
Make sure you also read KDAB's blog on this, which has a lot more technical details and tips.
"The Android robot is reproduced or modified from work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License."
Subscribe to our newsletter
Try Qt 6.4 Now!
Download the latest release here: www.qt.io/download.
Qt 6 is the productivity platform for the future, with next-gen 2D & 3D UX and limitless scalability.
Explore Qt World
Check our Qt demos and case studies in the virtual Qt World
Check out all our open positions here and follow us on Instagram to see what it's like to be #QtPeople.
Näytä tämä julkaisu Instagramissa.
Want to build something for tomorrow, join #QtPeople today! We have loads of cool jobs you don't want to miss! http://qt.io/careers #builtwithQt #software #developers #coding #framework #tool #tooling #C++ #QML #engineers #sales #tech #technology #UI #UX #CX #Qt #Qtdev #global #openpositions #careers #job
Henkilön Qt (@theqtcompany) jakama julkaisu