diff --git a/src/plugins/qmakeandroidsupport/androidpackageinstallationfactory.cpp b/src/plugins/qmakeandroidsupport/androidpackageinstallationfactory.cpp index 9c20c29020f..5028ae23f43 100644 --- a/src/plugins/qmakeandroidsupport/androidpackageinstallationfactory.cpp +++ b/src/plugins/qmakeandroidsupport/androidpackageinstallationfactory.cpp @@ -99,7 +99,15 @@ BuildStep *AndroidPackageInstallationFactory::restore(BuildStepList *parent, con bool AndroidPackageInstallationFactory::canClone(BuildStepList *parent, BuildStep *product) const { - return canCreate(parent, product->id()); + if (parent->id() != ProjectExplorer::Constants::BUILDSTEPS_BUILD) + return false; + if (!Android::AndroidManager::supportsAndroid(parent->target())) + return false; + if (product->id() != AndroidPackageInstallationStep::Id) + return false; + if (parent->contains(AndroidPackageInstallationStep::Id)) + return false; + return true; } BuildStep *AndroidPackageInstallationFactory::clone(BuildStepList *parent, BuildStep *product)