diff --git a/src/plugins/qmakeandroidsupport/qmakeandroidbuildapkstep.cpp b/src/plugins/qmakeandroidsupport/qmakeandroidbuildapkstep.cpp index 360e7ce6534..cf77566d93d 100644 --- a/src/plugins/qmakeandroidsupport/qmakeandroidbuildapkstep.cpp +++ b/src/plugins/qmakeandroidsupport/qmakeandroidbuildapkstep.cpp @@ -205,16 +205,11 @@ bool QmakeAndroidBuildApkStep::init() QString outputDir = bc->buildDirectory().appendPath(QLatin1String(Constants::ANDROID_BUILDDIRECTORY)).toString(); const auto *pro = static_cast(project()); - m_skipBuilding = m_proFilePathForInputFile.isEmpty(); + const QmakeProjectManager::QmakeProFileNode *node = pro->rootQmakeProjectNode()->findProFileFor(proFilePathForInputFile()); + m_skipBuilding = !node; if (m_skipBuilding) return true; - const QmakeProjectManager::QmakeProFileNode *node = pro->rootQmakeProjectNode()->findProFileFor(m_proFilePathForInputFile); - if (!node) { // should never happen - emit addOutput(tr("Internal Error: Could not find .pro file."), BuildStep::ErrorMessageOutput); - return false; - } - QString inputFile = node->singleVariableValue(QmakeProjectManager::AndroidDeploySettingsFile); if (inputFile.isEmpty()) { // should never happen emit addOutput(tr("Internal Error: Unknown Android deployment JSON file location."), BuildStep::ErrorMessageOutput);