Android: bump min supported SDK to 28 (Android 9)
Bump the minimum supported Android API from 23 to 28 i.e. Android Oreo 9. This is done to focus more and more on recent versions. Fixes: QTBUG-125023 Task-number: QTBUG-124890 Change-Id: I4d510b771f413e5711dd44de454211e019c63db6 Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
This commit is contained in:
parent
aae5c89d5f
commit
841bbbe8ec
@ -137,9 +137,9 @@ function(qt_auto_detect_android)
|
||||
# ANDROID_NATIVE_API_LEVEL is an just an alias to ANDROID_PLATFORM, check for both
|
||||
if(NOT DEFINED ANDROID_PLATFORM AND NOT DEFINED ANDROID_NATIVE_API_LEVEL)
|
||||
message(STATUS "Neither ANDROID_PLATFORM nor ANDROID_NATIVE_API_LEVEL"
|
||||
" were specified, using API level 23 as default")
|
||||
set(ANDROID_PLATFORM "android-23" CACHE STRING "")
|
||||
set(ANDROID_NATIVE_API_LEVEL 23 CACHE STRING "")
|
||||
" were specified, using API level 28 as default")
|
||||
set(ANDROID_PLATFORM "android-28" CACHE STRING "")
|
||||
set(ANDROID_NATIVE_API_LEVEL 28 CACHE STRING "")
|
||||
endif()
|
||||
if(NOT DEFINED ANDROID_STL)
|
||||
set(ANDROID_STL "c++_shared" CACHE STRING "")
|
||||
|
@ -841,7 +841,7 @@ function(qt_generate_global_device_pri_file)
|
||||
file(TO_CMAKE_PATH ${ANDROID_NDK} ANDROID_NDK)
|
||||
string(APPEND content "DEFAULT_ANDROID_NDK_ROOT = ${ANDROID_NDK}\n")
|
||||
|
||||
set(android_platform "android-23")
|
||||
set(android_platform "android-28")
|
||||
if(ANDROID_PLATFORM)
|
||||
set(android_platform "${ANDROID_PLATFORM}")
|
||||
elseif(ANDROID_NATIVE_API_LEVEL)
|
||||
|
@ -190,7 +190,7 @@ If you don't supply the configuration argument ``-DANDROID_ABI=...``, it will de
|
||||
* x86: ``-DANDROID_ABI=x86``
|
||||
* x86_64: ``-DANDROID_ABI=x86_64``
|
||||
|
||||
By default we set the android API level to 23. Should you need to change this supply the following
|
||||
By default we set the android API level to 28. Should you need to change this supply the following
|
||||
configuration argument to the above CMake call: ``-DANDROID_PLATFORM=android-${API_LEVEL}``.
|
||||
|
||||
### Cross compiling for iOS
|
||||
|
@ -89,7 +89,7 @@ The following table describes the mapping of configure options to CMake argument
|
||||
| | | assumed. |
|
||||
| -android-sdk <path> | -DANDROID_SDK_ROOT=<path> | |
|
||||
| -android-ndk <path> | -DCMAKE_TOOLCHAIN_FILE=<toolchain file in NDK> | |
|
||||
| -android-ndk-platform android-23 | -DANDROID_PLATFORM=android-23 | |
|
||||
| -android-ndk-platform android-28 | -DANDROID_PLATFORM=android-28 | |
|
||||
| -android-abis <abi_1>,...,<abi_n> | -DANDROID_ABI=<abi_1> | only one ABI can be specified |
|
||||
| -android-style-assets | -DFEATURE_android_style_assets=ON | |
|
||||
| -android-javac-source | -DQT_ANDROID_JAVAC_SOURCE=7 | Set the javac build source version. |
|
||||
|
@ -90,9 +90,9 @@ macro.NdkVer = "r26b"
|
||||
macro.NdkFullVer = "26.1.10909125"
|
||||
macro.NdkCompilerVer = "Clang 17.0.2"
|
||||
macro.JdkVer = "17"
|
||||
macro.AndroidMinApiVer = "26"
|
||||
macro.AndroidMinApiVer = "28"
|
||||
macro.AndroidMaxApiVer = "34"
|
||||
macro.AndroidMinVer = "8.0"
|
||||
macro.AndroidMinVer = "9"
|
||||
macro.AndroidMaxVer = "14"
|
||||
macro.AndroidPlatformVer = "34"
|
||||
macro.AndroidBuildToolsVer = "34.0.0"
|
||||
|
@ -27,7 +27,7 @@ android {
|
||||
namespace "org.qtproject.qt.android"
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 23
|
||||
minSdkVersion 28
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
@ -26,7 +26,7 @@ android {
|
||||
compileSdk 34
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 23
|
||||
minSdkVersion 28
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
@ -26,7 +26,7 @@ android {
|
||||
compileSdk 34
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 23
|
||||
minSdkVersion 28
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
@ -165,7 +165,7 @@ struct Options
|
||||
// Versioning
|
||||
QString versionName;
|
||||
QString versionCode;
|
||||
QByteArray minSdkVersion{"23"};
|
||||
QByteArray minSdkVersion{"28"};
|
||||
QByteArray targetSdkVersion{"34"};
|
||||
|
||||
// lib c++ path
|
||||
@ -1849,8 +1849,8 @@ bool updateAndroidManifest(Options &options)
|
||||
if (reader.isStartElement()) {
|
||||
if (reader.name() == "uses-sdk"_L1) {
|
||||
if (reader.attributes().hasAttribute("android:minSdkVersion"_L1))
|
||||
if (reader.attributes().value("android:minSdkVersion"_L1).toInt() < 23) {
|
||||
fprintf(stderr, "Invalid minSdkVersion version, minSdkVersion must be >= 23\n");
|
||||
if (reader.attributes().value("android:minSdkVersion"_L1).toInt() < 28) {
|
||||
fprintf(stderr, "Invalid minSdkVersion version, minSdkVersion must be >= 28\n");
|
||||
return false;
|
||||
}
|
||||
} else if ((reader.name() == "application"_L1 ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user