I am attempting to build an Android APK using the following command:
cordova build android --release -- --gradleArg=-PcdvMinSdkVersion=19
Yet when I verify which minSdkVersion the built APK targets, I am informed it's version 15 (0xf):
aapt list -a android-release.apk | grep SdkVersion
Why is the first command not working?
I am NOT using Crosswalk (looking at build.gradle, this should not matter anyway).
I have found the answer - I am using the plugin phonegap-plugin-barcodescanner which explicitly sets the minSdkVersion in its own build.gradle file:
ext.cdvMinSdkVersion=15
Is the very first line.
In my case the same problem was fixed by adding the following setting in the config.xml
file:
<preference name="android-minSdkVersion" value="19" />
You may use whatever android SDK version as a minimum as you wish.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With