'uses-sdk:minSdkVersion 19 cannot be smaller than version 22 declared in library
Earlier we were using Android API level 28 with minSdkVersion as 19 in config.xml and the app was available in the play store. Recently we updated the android version ( By removing and adding latest android as google play console mandated to have android above API level 29 ). Bu doing this ionic build gave below error :
Manifest merger failed : uses-sdk:minSdkVersion 19 cannot be smaller than version 22 declared in library [:CordovaLib] D:\MobileApp\MyApp\platforms\android\CordovaLib\build\intermediates\library_manifest\debug\AndroidManifest.xml as the library might be using APIs not available in 19
Suggestion: use a compatible library with a minSdk of at most 19,
or increase this project's minSdk version to at least 22,
or use tools:overrideLibrary="org.apache.cordova" to force usage (may lead to runtime failures)
Due to this app could be updated in could of mobile phones. Please suggest if there is any way to have 19 as minSdkVersion.
Thanks !
Solution 1:[1]
Try to change the minSDKVersion to 22 in your config.xml file. I think the problem will be resolved. I had the same problem.
Example: <preference name="android-minSdkVersion" value="22" />
Solution 2:[2]
I have solution, it's not very complicated :
Enter on "player settings" (file --> build settings --> player settings) and scroll.
When you see "Minimum API Level", chante that (i choice Android 8.0 "Oreo" (API Level 26)).
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | ulrich ngaha |
Solution 2 | user18976014 |