Fix minSdkVersion in deploy step

Deploy step uses AndroidManager::minimumSDK() which looks for the
version in the AndroidManifest.xml file which used to contain the
minimum and target sdk, but if the manifest doesn't contain that
value, this logic returns 0. So, return the defaultMinimumSDK()
in case the first way fails.

Change-Id: Id10e552d7c8de4d3544b7fa8f26ae5dd9e974df5
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Assam Boudjelthia
2021-09-05 19:16:49 +03:00
parent c1dff744a0
commit e92418edca
2 changed files with 10 additions and 6 deletions

View File

@@ -134,9 +134,8 @@ bool AndroidDeployQtStep::init()
QTC_ASSERT(bc, return false);
auto androidBuildApkStep = bc->buildSteps()->firstOfType<AndroidBuildApkStep>();
int minTargetApi = AndroidManager::minimumSDK(target());
qCDebug(deployStepLog) << "Target architecture:" << m_androidABIs
<< "Min target API" << minTargetApi;
<< "Min target API" << AndroidManager::minimumSDK(target());
// Try to re-use user-provided information from an earlier step of the same type.
BuildStepList *bsl = stepList();