Reputation: 1009
I'm working on a plugin for cordova and would like to set the minimum sdk version. However it isn't overwritten when I try to use these options in the plugin.xml file:
<platform name="android">
<preference name="android-minSdkVersion" value="16" />
<preference name="android-targetSdkVersion" value="23" />
</platform>
or in the manifest tag
<config-file target="AndroidManifest.xml" parent="/manifest">
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="23" />
</config-file>
These ways are both phonegap ways to set the sdk versions and, if I'm correct, still cordova ways. But the first one gives an error:
Failed to install 'plugin.demo':Error: Variable(s) missing: ANDROID-MINSDKVERSION, ANDROID-TARGETSDKVERSION
And the second option just add a new row with uses-sdk, which also creates a lot of errors.
How do I set the sdk version in cordova (v6+)?
Upvotes: 1
Views: 1063
Reputation: 96
<config-file target="res/xml/config.xml" parent="/*">
<preference name="android-minSdkVersion" value="15" />
</config-file>
Upvotes: 3