forked from qt-creator/qt-creator
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 <alessandro.portale@qt.io>
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user