Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-29112

Defining ANDROID_PLATFORM in an Android kit's CMake configuration has no effect

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Not Evaluated Not Evaluated
    • None
    • Qt Creator 10.0.0
    • Android Support
    • None
    • macOS Ventura 13.1
      Qt 6.5.0
      Qt Creator 10.0.0
    • macOS
    • 850f1ce66 (10.0)

      When configuring a CMake project with an Android kit, Qt Creator automatically sets the ANDROID_PLATFORM variable to (what I assume is) the lowest version supported by the selected NDK. (In my case, that's "android-23" for NDK 23.2.)

      Very often, I need to switch to a different platform version, such as "android-31". I tried to permanently make this part of the Android kit's settings but couldn't get it to work. Setting the ANDROID_PLATFORM variable there does not have any effect.

      Steps to reproduce:

      1. In the Qt Creator preferences, edit the "CMake Configuration" of the Android kit of choice. There add the line "ANDROID_PLATFORM:STRING=android-31".
      2. Open a new / not yet configured CMake project (for example created by Qt Creator via "New project") and select bespoke Android kit. Click "Configure project".
      3. Inspect the CMake configure log in "7 General messages" in the bottom bar. 

      Expected result: The log mentions that Android API 31 is targeted.

      Observed result:

      • The log mentions: "Android: Targeting API '23' ..."
      • Furthermore, the "Initial Configuration" in the project settings reports two instances of the ANDROID_PLATFORM variable:

       

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

            portale Alessandro Portale
            rojsc Robert Schittny
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes