Android: Warn if the selected device main ABI is not selected

Task-number: QTCREATORBUG-23291
Change-Id: I2ae13edaee30c6548a37e077c18f508a42b42d25
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Assam Boudjelthia
2020-07-14 15:23:26 +03:00
parent e0915b7eff
commit 27514fa94d
6 changed files with 27 additions and 1 deletions

View File

@@ -38,6 +38,7 @@
#include <coreplugin/messagemanager.h>
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/buildsystem.h>
#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/project.h>
@@ -207,6 +208,18 @@ bool AndroidDeployQtStep::init()
if (!info.isValid()) // aborted
return false;
const QString buildKey = target()->activeBuildKey();
auto selectedAbis = buildSystem()->extraData(buildKey, Constants::ANDROID_ABIS).toStringList();
if (!selectedAbis.contains(info.cpuAbi.first())) {
Core::MessageManager::write(
tr("Android: The selected device main ABI (%1) is not selected! The app execution or "
"debugging might not work properly. Add it from Projects > Build > Build Steps > "
"qmake > ABIs.")
.arg(info.cpuAbi.first()),
Core::MessageManager::WithFocus);
}
m_avdName = info.avdname;
m_serialNumber = info.serialNumber;
qCDebug(deployStepLog) << "Selected device info:" << info;