diff --git a/src/plugins/android/androidbuildapkstep.cpp b/src/plugins/android/androidbuildapkstep.cpp index cc3287b61e0..8a21d17b84f 100644 --- a/src/plugins/android/androidbuildapkstep.cpp +++ b/src/plugins/android/androidbuildapkstep.cpp @@ -603,7 +603,16 @@ void AndroidBuildApkStep::setupOutputFormatter(OutputFormatter *formatter) void AndroidBuildApkStep::showInGraphicalShell() { - Core::FileUtils::showInGraphicalShell(Core::ICore::dialogParent(), m_packagePath); + FilePath packagePath = m_packagePath; + if (!packagePath.exists()) { // File name might be incorrect. See: QTCREATORBUG-22627 + packagePath = packagePath.parentDir(); + if (!packagePath.exists()) { + qCDebug(buildapkstepLog).noquote() + << "Could not open package location: " << packagePath; + return; + } + } + Core::FileUtils::showInGraphicalShell(Core::ICore::dialogParent(), packagePath); } QWidget *AndroidBuildApkStep::createConfigWidget()