From 21118bba679d702278caba35260361a508930942 Mon Sep 17 00:00:00 2001 From: Kelvin Zhang Date: Sat, 12 Feb 2022 09:40:35 -0800 Subject: [PATCH] Improve error message for GetMinSdkVersion Bug: 219148978 Test: th Change-Id: I72c653b6e7e159abf0b7aca394cf465869542483 --- tools/releasetools/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py index 850619940b..f4f9178dbb 100644 --- a/tools/releasetools/common.py +++ b/tools/releasetools/common.py @@ -2244,8 +2244,8 @@ def GetMinSdkVersion(apk_name): stdoutdata, stderrdata = proc.communicate() if proc.returncode != 0: raise ExternalError( - "Failed to obtain minSdkVersion: aapt2 return code {}:\n{}\n{}".format( - proc.returncode, stdoutdata, stderrdata)) + "Failed to obtain minSdkVersion for {}: aapt2 return code {}:\n{}\n{}".format( + apk_name, proc.returncode, stdoutdata, stderrdata)) for line in stdoutdata.split("\n"): # Looking for lines such as sdkVersion:'23' or sdkVersion:'M'.