Search code examples
androidcordovaandroid-gradle-plugincordova-cli

cordova build setting cdvMinSdkVersion


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).


Solution

  • 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.