From 4bd316ab62e31d2b631351bc9e33ccaff496639d Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 12 Feb 2020 18:25:11 +0100 Subject: [PATCH] Android: Access buildTargetSdk directly when possible Change-Id: I1f9996919d982f8e54c595abaa44ed0e10a79422 Reviewed-by: Assam Boudjelthia Reviewed-by: Alessandro Portale --- src/plugins/android/androidbuildapkstep.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/plugins/android/androidbuildapkstep.cpp b/src/plugins/android/androidbuildapkstep.cpp index 194c3c52296..7ef37b89ca9 100644 --- a/src/plugins/android/androidbuildapkstep.cpp +++ b/src/plugins/android/androidbuildapkstep.cpp @@ -234,8 +234,7 @@ bool AndroidBuildApkStep::init() return true; } - QString buildTargetSdk = AndroidManager::buildTargetSDK(target()); - if (buildTargetSdk.isEmpty()) { + if (m_buildTargetSdk.isEmpty()) { emit addOutput(tr("Android build SDK not defined. Check Android settings."), OutputFormat::Stderr); return false; @@ -243,7 +242,7 @@ bool AndroidBuildApkStep::init() QStringList arguments = {"--input", m_inputFile, "--output", outputDir, - "--android-platform", AndroidManager::buildTargetSDK(target()), + "--android-platform", m_buildTargetSdk, "--jdk", AndroidConfigurations::currentConfig().openJDKLocation().toString()}; if (m_verbose)