forked from qt-creator/qt-creator
Handling minimum required Android API level for Qt 5.7
The build breaks now with a clear warning if the minimum API level set is less than the minimum required by the kit. The device dialog also used to show incorrect devices on the first compile cycle in case of the missing manifest file. Now stock manifest file is used from the kit to analyze the minumun API level for the devices Task-number: QTCREATORBUG-16740 Change-Id: Icd4d8209dad870cba5f99af1dd700830517f9294 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
This commit is contained in:
@@ -119,6 +119,13 @@ bool AndroidBuildApkStep::init(QList<const BuildStep *> &earlierSteps)
|
||||
if (!version)
|
||||
return false;
|
||||
|
||||
int minSDKForKit = AndroidManager::minimumSDK(target()->kit());
|
||||
if (AndroidManager::minimumSDK(target()) < minSDKForKit) {
|
||||
emit addOutput(tr("The API level set for the APK is less than the minimum required by the kit."
|
||||
"\nThe minimum API level required by the kit is %1.").arg(minSDKForKit), ErrorOutput);
|
||||
return false;
|
||||
}
|
||||
|
||||
JavaParser *parser = new JavaParser;
|
||||
parser->setProjectFileList(target()->project()->files(ProjectExplorer::Project::AllFiles));
|
||||
parser->setSourceDirectory(androidPackageSourceDir());
|
||||
|
||||
Reference in New Issue
Block a user