Cordova Build minSdkVersion change to 19
See original GitHub issueHello,
I have android version 7.1.1 in my project
after adding android i build project using “cordova Build” command
And i got following error
See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
:app:processDebugManifest FAILED
uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:CordovaLib] C:\Users\trikonuser\TestAgain\WebCall_AS_tsim\webCall\platforms\android\CordovaLib\build\ intermediates\manifests\full\debug\AndroidManifest.xml as the library might be using APIs not available in 16
Suggestion: use a compatible library with a minSdk of at most 16,
or increase this project's minSdk version to at least 19,
or use tools:overrideLibrary="org.apache.cordova" to force usage (may lead to runtime failures)
Now magic is in my files www/config.xml and xml/config.xml
<preference name="android-minSdkVersion" value="19" />
<preference name="android-targetSdkVersion" value="27"/>
and main/AndroidManifest.xml file I have put
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="27" />
While My gradle file also contain
project.ext {
defaultBuildToolsVersion=“27.0.1” //String defaultMinSdkVersion=19 //Integer - Minimum requirement is Android 4.4 defaultTargetSdkVersion=27 //Integer - We ALWAYS target the latest by default defaultCompileSdkVersion=27 //Integer - We ALWAYS compile with the latest by default }
### BUT NOW I RUN COMMAND :- CORDOVA BUILD it changes all config i mad automatically to previous as follows www/config.xml and xml/config.xml
<preference name="android-minSdkVersion" value="16" />
<preference name="android-targetSdkVersion" value="27"/>
and main/AndroidManifest.xml file I have put
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="27" />
How Cordova Build command run rechange agin to 16 if they already want to 19
I used below phonegap version
> <preference name="phonegap-version" value="cli-6.3.0" />
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top GitHub Comments
The problem for me was in cordova-plugin-browsertab.
You need to change line 1 of
my_project/plugins/cordova-plugin-browsertab/src/android/BrowserTab.gradle
toMake sure you have the minimum SDK added to your
config.xml
Then remove and add cordova-android by:
Thanks it worked for me