Add apk_name information in error message
Logging the apk_name will improve debugging process if
`GetMinSdkVersion` returns an exception.
Test: None
Change-Id: I3ddf602d92701dcaaa4821fe42a76a870a721a11
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index 8a8a613..dff782e 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -2456,7 +2456,7 @@
m = re.match(r'(?:minSdkVersion|sdkVersion):\'([^\']*)\'', line)
if m:
return m.group(1)
- raise ExternalError("No minSdkVersion returned by aapt2")
+ raise ExternalError("No minSdkVersion returned by aapt2 for apk: {}".format(apk_name))
def GetMinSdkVersionInt(apk_name, codename_to_api_level_map):