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

androiddeployqt causes gradle to crash when platform;android-33-ext4 or platform;android-33-ext5 is installed and --android-platform is not specified explicitly

    XMLWordPrintable

Details

    • Android
    • 2023wk16FOQtforAndroid

    Description

      In androiddeployqt/main.cpp, an assumption is made that the last segment of androidPlatform will be the platform version number:

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

      This is not true any more since there are android-33-ext4 and android-33-ext5 platforms. If --android-platform is not explicitly specified and one of these platform versions is installed in the SDK, androiddeployqt will scan the platforms directory, pick android-33-ext5, and use "ext5" as the version instead of "33", which causes gradle to crash.

      Qt5AndroidSupport.cmake had an escape hatch for this where the platform version could be explicitly specified by setting ANDROID_SDK_PLATFORM, but this function was removed in Qt6AndroidMacros.cmake, so it is also impossible to work around this using the normal Qt6 CMake macros.

      Attachments

        Issue Links

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

          Activity

            People

              qtandroidteam Qt Android Team
              csnover C S
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes