QT_ANDROID_COMPILE_SDK_VERSION

Versión del SDK de destino de Android.

Esta propiedad se introdujo en Qt 6.9.

Nota: Esta propiedad solo se utiliza si se dirige a la plataforma Android.

Especifica la versión del SDK de Android con la que se compila la aplicación. Este valor se transmite a build.gradle como compileSdkVersion. Este valor se puede proporcionar mediante el parámetro --android-platform de androiddeployqt, que tiene prioridad sobre esta propiedad de CMake.

set_target_properties(${target} PROPERTIES
    QT_ANDROID_COMPILE_SDK_VERSION 37.0
)

También funciona el siguiente formato:

set_target_properties(${target} PROPERTIES
 QT_ANDROID_COMPILE_SDK_VERSION "android-37.0"
)

A partir del nivel de API 37, cada plataforma del SDK de Android incluye un nivel de API secundario, por lo que debes indicarlo completo. Por ejemplo, utiliza 37.0 en lugar de 37, ya que este último no coincide con ninguna plataforma instalada.

Véase también qt_android_generate_deployment_settings() y QT_ANDROID_TARGET_SDK_VERSION.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.