Manifest merger failed : uses-sdk:minSdkVersion 19 cannot be smaller than version 22 declared in library
See original GitHub issueIssue Type
- [x ] Bug Report
- Feature Request
- Support Question
Description
I encountered this bug when compiling the ionic project. I have followed the instructions on the Internet to continuously modify the project.properties under “myproject/platforms/android” and the project.properties under “myproject/platforms/android/Coedovalib”.
But this did not take effect. When I cleared android and added android again, the same error still appeared. And, the value I changed was restored.
Information
Execution failed for task ‘:app:processDebugManifest’.
Manifest merger failed : uses-sdk:minSdkVersion 19 cannot be smaller than version 22 declared in library [:CordovaLib]
Command or Code
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="29" />
Environment, Platform, Device
Version information
Ionic:
Ionic CLI : 6.11.8 Ionic Framework : @ionic/angular 5.0.4 @angular-devkit/build-angular : 0.803.24 @angular-devkit/schematics : 8.1.3 @angular/cli : 8.1.3 @ionic/angular-toolkit : 2.3.3
Cordova:
Cordova CLI : 10.0.0 Cordova Platforms : android 9.0.0 Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 19 other plugins)
Utility:
cordova-res : 0.15.1 native-run : not installed
System:
Android SDK Tools : 26.1.1 (D:\Program Files\sdk) NodeJS : v12.18.0 (D:\Program Files\nodejs\node.exe) npm : 6.14.4 OS : Windows 10
Checklist
- I searched for already existing GitHub issues about this
- I updated all Cordova tooling to their most recent version
- I included all the necessary information above
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (7 by maintainers)
This is occurring because you (or a plugin) is setting the project min sdk to something lower than the cordova framework’s min sdk, which for 9.x is set to 22.
Do you have the
android-minSdkVersion
preference set in yourconfig.xml
? If so I’d suggest to increase it to 22 or remove it to allow it to default to 22.Do note that increasing the min sdk to 22 will limit your app to Android 5.1 or later.
For others that with similar needs
I was able to build by adding the following to my project’s config.xml
As noted by @breautek
Results in error