Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-110326

Qt apps cannot be built against an SDK with extensions

    XMLWordPrintable

Details

    • Android
    • 2023wk06FOQtforAndroid, 2023wk08FOQtforAndroid, 2023wk10FOQtforAndroid, 2023wk24FOQtforAndroid

    Description

      Building my Qt 6.4 app (6.4.2 from the installer) for Android on the GitHub CI suddenly started failing with

      Starting a Gradle Daemon (subsequent builds will be faster)
      FAILURE: Build completed with 2 failures.
      
          1: Task failed with an exception.
          -----------
          * Where:
          Build file '/home/runner/work/brickstore/brickstore/build/android-build/build.gradle' line: 37
      
          * What went wrong:
          A problem occurred evaluating root project 'android-build'.
          > For input string: "ext4" 

      My build.gradle is fairly Qt standard and line 37 reads:

      compileSdkVersion androidCompileSdkVersion.toInteger() 

      Googling for "ext4", I found that Android SDK now come with extensions and version 33 is currently at "extension level 4". Sure enough the GitHub runners have been updated to android-33-ext4 and our androiddeployqt cannot handle this. It creates the gradle.properties file like this:

       gradleProperties["androidCompileSdkVersion"] = options.androidPlatform.split(u'-').last().toLocal8Bit();
       

      which chops off the "ext4" from "android-33-ext4" and puts it into the sdk version, which of course is neither the SDK version, nor can it be run through toInteger().

      I think we should switch from last() to at(1) to make it possible to build Qt apps again, but then we should also make sure to get the extension level across to build.gradle as compileSdkExtension 4, but this would require updated templates in every app.

      (see https://developer.android.com/guide/sdk-extensions for more information)

       

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              assam Assam Boudjelthia
              rgriebl Robert Griebl
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes