diff --git a/src/plugins/qmakeandroidsupport/qmakeandroidbuildapkstep.cpp b/src/plugins/qmakeandroidsupport/qmakeandroidbuildapkstep.cpp
index 6579fc8d162aae351e888ebadd35242814d3419a..360e7ce6534f4b92f034e2232e571e3341ec0e86 100644
--- a/src/plugins/qmakeandroidsupport/qmakeandroidbuildapkstep.cpp
+++ b/src/plugins/qmakeandroidsupport/qmakeandroidbuildapkstep.cpp
@@ -205,6 +205,10 @@ bool QmakeAndroidBuildApkStep::init()
     QString outputDir = bc->buildDirectory().appendPath(QLatin1String(Constants::ANDROID_BUILDDIRECTORY)).toString();
 
     const auto *pro = static_cast<QmakeProjectManager::QmakeProject *>(project());
+    m_skipBuilding = m_proFilePathForInputFile.isEmpty();
+    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);
@@ -270,6 +274,17 @@ bool QmakeAndroidBuildApkStep::init()
     return true;
 }
 
+void QmakeAndroidBuildApkStep::run(QFutureInterface<bool> &fi)
+{
+    if (m_skipBuilding) {
+        emit addOutput(tr("No application .pro file found, not building an APK."), BuildStep::ErrorMessageOutput);
+        fi.reportResult(true);
+        emit finished();
+        return;
+    }
+    AndroidBuildApkStep::run(fi);
+}
+
 void QmakeAndroidBuildApkStep::setupProcessParameters(ProjectExplorer::ProcessParameters *pp,
                                                       ProjectExplorer::BuildConfiguration *bc,
                                                       const QStringList &arguments,
diff --git a/src/plugins/qmakeandroidsupport/qmakeandroidbuildapkstep.h b/src/plugins/qmakeandroidsupport/qmakeandroidbuildapkstep.h
index 0e5f821416fced5fee3045676c3ec0987d1bcaec..be1749d4354830d93ec92dc8163dd942d3847344 100644
--- a/src/plugins/qmakeandroidsupport/qmakeandroidbuildapkstep.h
+++ b/src/plugins/qmakeandroidsupport/qmakeandroidbuildapkstep.h
@@ -69,6 +69,7 @@ public:
     QString proFilePathForInputFile() const;
     void setProFilePathForInputFile(const QString &path);
 
+
 protected:
     friend class QmakeAndroidBuildApkStepFactory;
     QmakeAndroidBuildApkStep(ProjectExplorer::BuildStepList *bc,
@@ -79,6 +80,7 @@ protected:
 protected:
     void ctor();
     bool init();
+    void run(QFutureInterface<bool> &fi);
     void processStarted();
     ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
     bool fromMap(const QVariantMap &map);
@@ -98,6 +100,7 @@ private:
     QString m_proFilePathForInputFile;
     QString m_command;
     QString m_argumentsPasswordConcealed;
+    bool m_skipBuilding;
 };
 
 } // namespace Internal