Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Android release APK and AAB



  • Greetings Trolls,

    So I'm building a Qt application with make aab, it generates a release aab fine in the build/outputs/bundle/release folder.

    However it only generates a debug apk in the build/outputs/bundle/debug directory.

    Is there a way to enforce a release apk when building with make aab ?


  • Moderators

    I think you need to calls make apk separately. It should run quickly as the only thing to do is new deployment - compilation was already done.



  • @sierdzio nope, I just tried that no matter how I call make apk, either before or after I always get the debug folder and nothing else.


  • Moderators

    Qt always builds the APK in debug folder, even if it is compiled in release mode. However, I thought it was supposed to change in 5.14.



  • Solved it !

    With 5.14.2, I had to do the following to get both the apk and aab in the proper place:

    #----------------------------------------------------------------------------------------------
    # FIXME Qt android: We have to call androiddeployqt to generate a release apk.
    
    androiddeployqt="$external/Qt/$Qt5_version/bin/androiddeployqt"
    
    "$androiddeployqt" --release --apk --aab \
                       --input android-HelloSky-deployment-settings.json \
                       --output android-build \
                       --android-platform android-$SDK_version \
                       --jdk $JAVA_HOME
    
    #----------------------------------------------------------------------------------------------

Log in to reply