aboutsummaryrefslogtreecommitdiffstats
path: root/java/dex.go
diff options
context:
space:
mode:
Diffstat (limited to 'java/dex.go')
-rw-r--r--java/dex.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/java/dex.go b/java/dex.go
index f729bade..06ee272d 100644
--- a/java/dex.go
+++ b/java/dex.go
@@ -70,7 +70,12 @@ func (j *Module) dxFlags(ctx android.ModuleContext) []string {
"--verbose")
}
- flags = append(flags, "--min-api "+j.minSdkVersionNumber(ctx))
+ minSdkVersion, err := sdkVersionToNumberAsString(ctx, j.minSdkVersion())
+ if err != nil {
+ ctx.PropertyErrorf("min_sdk_version", "%s", err)
+ }
+
+ flags = append(flags, "--min-api "+minSdkVersion)
return flags
}