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

How to create an .aab from Qt 5.12.2 thus with single .apk's?



  • Hi,
    is there a way to create an .aab from Qt 5.12.2 thus with single .apk's?

    I installed Qt 5.15.2 with Qt Creator 4.14.1., then via the maintainance tool the "free of bug" version 5.12.2 (originally I wanted the 5.12.1 but this was not selectable). Now I tried to build with Qt 5.12.2 release but got this error:

    FAILURE: Build failed with an exception.
    
    * Where:
    Build file 'R:\App\Code\build-cam-Android_Qt_5_12_2_Clang_arm64_v8a-Release\android-build\build.gradle' line: 74
    
    * What went wrong:
    A problem occurred evaluating root project 'android-build'.
    > Could not get unknown property 'qtMinSdkVersion' for DefaultConfig_Decorated{name=main, dimension=null, minSdkVersion=null, targetSdkVersion=null, renderscriptTargetApi=null, renderscriptSupportModeEnabled=null, renderscriptSupportModeBlasEnabled=null, renderscriptNdkModeEnabled=null, versionCode=null, versionName=null, applicationId=null, testApplicationId=null, testInstrumentationRunner=null, testInstrumentationRunnerArguments={}, testHandleProfiling=null, testFunctionalTest=null, signingConfig=null, resConfig=[en], mBuildConfigFields={}, mResValues={}, mProguardFiles=[], mConsumerProguardFiles=[], mManifestPlaceholders={}, mWearAppUnbundled=null} of type com.android.build.gradle.internal.dsl.DefaultConfig.
    
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
    
    * Get more help at https://help.gradle.org
    
    BUILD FAILED in 4s
    Warning: QML import could not be resolved in any of the import paths: com.fbo
    Warning: QML import could not be resolved in any of the import paths: com.dradar
    Warning: QML import could not be resolved in any of the import paths: com.dcross
    Warning: QML import could not be resolved in any of the import paths: com.scali
    Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.impl
    Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Fusion.impl
    Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Imagine.impl
    Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Material.impl
    Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Universal.impl
    Building the android package failed!
      -- For more information, run this command with --verbose.
    11:14:17: The process "C:\Programs\Qt\5.12.2\android_arm64_v8a\bin\androiddeployqt.exe" exited with code 14.
    Error while building/deploying project cam (kit: Android Qt 5.12.2 Clang arm64-v8a)
    When executing step "Build Android APK"
    

    In my manifest I have

    <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="28"/>
    

    and under Projects/Build Steps/Android build SDK

    android-28
    

    Do I have to create a new Template with new gradle files?

    The next step would be somehow to create an .aab from the singel .apks. But how?

    I hoped I can to this from QtCreator but it's unfortunately only available for Qt 5.15.2 build.

    Thanks...


  • Moderators

    @PowerNow said in How to create an .aab from Qt 5.12.2 thus with single .apk's?:

    is there a way to create an .aab from Qt 5.12.2 thus with single .apk's?

    Not to my knowledge, no. I would like it as well :(

    Why do you need it ? AFAIK google still accepts individual apks for upload.



  • @J-Hilk Because I read here https://developer.android.com/guide/app-bundle

    Important: From August 2021, new apps will be required to publish with the Android App Bundle on Google Play. New apps larger than 150 MB are now supported by either Play Feature Delivery or Play Asset Delivery.
    

    I thought if I update from Qt 5.12.1 to Qt 5.15.2 this problem is solved. But unfortunately this version is regarding Sensors on Anroid completely buggy, I can't use it.

    https://forum.qt.io/topic/124787/qt-5-12-2-sensors-can-t-be-used-for-android-because-of-qtbug-77423/3

    So my idea was to build with Qt 5.12.1 and bundel with the new Qt Creator or somehow manually.


  • Moderators

    @PowerNow said in How to create an .aab from Qt 5.12.2 thus with single .apk's?:

    https://developer.android.com/guide/app-bundle

    oh, I hadn't read that yet, thats unfortunate.

    I'm not really in a position to upgrade the Qt version either ...


Log in to reply