user684805
user684805

Reputation: 163

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 !

Upvotes: 2

Views: 11315

Answers (3)

LBIRD S.E.
LBIRD S.E.

Reputation: 51

Try adding this 1 line code below, under Gradle Scripts > gradle.properties (Project Properties) > Syn now > Build (Clean project > Rebuild project)

android.suppressUnsupportedCompileSdk=32

Upvotes: 0

user18976014
user18976014

Reputation: 1

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

Upvotes: 0

Ulrich NGAKUI NGAHA
Ulrich NGAKUI NGAHA

Reputation: 97

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" />

Upvotes: 1

Related Questions