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

Building Android App Bundle fails with `Task 'bundle' not found`



  • I'm trying to build an Android App Bundle from QtCreator.
    I'm using Qt5.14.1, platform-29 and NDK 21.0.
    Building an empty QML project works fine and results in an aab file

    However, building my own project fails with

    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Task 'bundle' not found in root project 'android-build'. Some candidates are: 'build'.
    
    * Try:
    Run gradlew tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    Building the android package failed!
    

    gradlew tasks looks like below and indeed doesn't contain a 'bundle' task

    Build tasks
    -----------
    assemble - Assembles all variants of all applications and secondary packages.
    assembleAndroidTest - Assembles all the Test applications.
    assembleDebug - Assembles all Debug builds.
    assembleRelease - Assembles all Release builds.
    build - Assembles and tests this project.
    buildDependents - Assembles and tests this project and all projects that depend on it.
    buildNeeded - Assembles and tests this project and all projects it depends on.
    clean - Deletes the build directory.
    compileDebugAndroidTestSources
    compileDebugSources
    compileDebugUnitTestSources
    compileReleaseSources
    compileReleaseUnitTestSources
    mockableAndroidJar - Creates a version of android.jar that's suitable for unit tests.
    

    where the empty QML project did contain a bundle task

    Any ideas? Suggestions on how to proceed from here?



  • Apparently, I had an older gradlew hanging around which interfered


Log in to reply