Merge "Improve error message for GetMinSdkVersion" am: a88313f60b am: 9974ee58e2

Original change: https://android-review.googlesource.com/c/platform/build/+/1983906

Change-Id: I48f671890f6e8d336675e94ea682143eeeb0e222
This commit is contained in:
Treehugger Robot 2022-02-18 21:48:34 +00:00 committed by Automerger Merge Worker
commit 0f22ebfecc

View file

@ -2245,8 +2245,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'.