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

fresh online installation 6.6 does not compile android because of api version

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • 6.6.1
    • 6.6.0
    • None
    • Win64, Qt Creator 11.0.3, Qt 6.6.0
    • Android, Windows
    • 2023wk44FOQtforAndroid

    Description

      When fresh installing Qt (no previous components or QT installation) i followed exactly the videoguide on [Getting Started with Qt for Android | Qt 6.6|https://doc.qt.io/qt-6/android-getting-started.html] (only installed 6.6.0 but video is 6.4.0) i did setup all android dependencies.

      Installed OpenJDK, java --version gives me:

      openjdk 21 2023-09-19 LTS
      OpenJDK Runtime Environment Temurin-21+35 (build 21+35-LTS)
      OpenJDK 64-Bit Server VM Temurin-21+35 (build 21+35-LTS, mixed mode, sharing)

      After clicking on "Set Up SDK" the Qt downloads the SDK Tool Package and QT then propose the necessary downloads (important to note that it propose versions 31), NDK 25.1.8937393 and all is green without the error:

       

      Then I try to build standard hello world apk for Android Qt 6.6.0 Clang arm64_v8a (debug or release makes no difference) but Compile output gives me:

       

      FAILURE: Build failed with an exception.
      * What went wrong:
      Execution failed for task ':checkDebugAarMetadata'.
      > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
         > 2 issues were found when checking AAR metadata:
           
             1.  Dependency 'androidx.core:core:1.10.1' requires libraries and applications that
                 depend on it to compile against version 33 or later of the
                 Android APIs.
           
                 : is currently compiled against android-31.
           
                 Recommended action: Update this project to use a newer compileSdkVersion
                 of at least 33, for example 33.
           
                 Note that updating a library or application's compileSdkVersion (which
                 allows newer APIs to be used) can be done separately from updating
                 targetSdkVersion (which opts the app in to new runtime behavior) and
                 minSdkVersion (which determines which devices the app can be installed
                 on).
           
             2.  Dependency 'androidx.annotation:annotation-experimental:1.3.0' requires libraries and applications that
                 depend on it to compile against version 33 or later of the
                 Android APIs.
           
                 : is currently compiled against android-31.
           
                 Recommended action: Update this project to use a newer compileSdkVersion
                 of at least 33, for example 33.
           
                 Note that updating a library or application's compileSdkVersion (which
                 allows newer APIs to be used) can be done separately from updating
                 targetSdkVersion (which opts the app in to new runtime behavior) and
                 minSdkVersion (which determines which devices the app can be installed
                 on).
      * Try:
      > Run with --stacktrace option to get the stack trace.
      > Run with --debug option to get more log output.
      > Run with --scan to get full insights.
      

       

      Anyway, if I try to create Template for AndroidManifest.xml (does not matter if the files from older existed, or not), it gives me error:

       - but proceed and creates all files anyway

      Tho here is important to note the differences in versions in project/android/gradle/wrapper/gradle-wrapper.properties:

      and project/android/build.gradle:

       

      anyway... if I uninstall SDK 31 and Install 33 via Qt then it keeps proposing to install 31 and shows me error (warning):

       

      so if I try to uninstall these SDK 31 from sdkmanager.bat and install 33 manualy via:
      sdkmanager "platforms;android-33" "platform-tools" "build-tools;33.0.0"
      then upon build i have milion of errors... so my best guess the SDK does not fit to either JDK version or something else...

       

      I dont know how to find any workaround like manualy manipulating graddle options

      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
              shokarta Jiri Zaloudek
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes