From cd8da8fe5f608d4968b90f19f30b515058605b8c Mon Sep 17 00:00:00 2001 From: Assam Boudjelthia Date: Mon, 16 Aug 2021 20:19:46 +0300 Subject: Android: Get the minimum sdk level based on the used Qt version Currently, Creator gets the minimum sdk version from a hard-coded value (16) which is used for all projects. However, this is not ideal because some Qt versions require a specific sdk level to build and run properly. So, this change ensures that the minimum sdk value is obtained based the Qt version used in the project. Fixes: QTCREATORBUG-26127 Change-Id: I948dd18d16c3d9ca587ad7712aa4c9a1bfd53972 Reviewed-by: Alessandro Portale --- src/plugins/android/androidconfigurations.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins/android/androidconfigurations.cpp') diff --git a/src/plugins/android/androidconfigurations.cpp b/src/plugins/android/androidconfigurations.cpp index 9d5f871300..033fb26958 100644 --- a/src/plugins/android/androidconfigurations.cpp +++ b/src/plugins/android/androidconfigurations.cpp @@ -778,12 +778,12 @@ bool AndroidConfig::isValidNdk(const QString &ndkLocation) const QString AndroidConfig::bestNdkPlatformMatch(int target, const BaseQtVersion *qtVersion) const { - target = std::max(AndroidManager::apiLevelRange().first, target); + target = std::max(AndroidManager::defaultMinimumSDK(qtVersion), target); foreach (int apiLevel, availableNdkPlatforms(qtVersion)) { if (apiLevel <= target) return QString::fromLatin1("android-%1").arg(apiLevel); } - return QString("android-%1").arg(AndroidManager::apiLevelRange().first); + return QString("android-%1").arg(AndroidManager::defaultMinimumSDK(qtVersion)); } FilePath AndroidConfig::sdkLocation() const -- cgit v1.2.1