Nalin
Nalin

Reputation: 111

ERROR: Manifest merger failed : uses-sdk:minSdkVersion 1 cannot be smaller than version 19 declared in library [__tested_artifact__::CordovaLib]

I'm creating a cordova android project first time.upto build project everythings goes okey.after building the project, when I try to open in the Android IDE, Android Studio, I'm getting this error.

ERROR: Manifest merger failed : uses-sdk:minSdkVersion 1 cannot be smaller than version 19 declared in library [tested_artifact::CordovaLib] E:\projects\cordova\hello1\platforms\android\CordovaLib\build\intermediates\library_manifest\debug\AndroidManifest.xml as the library might be using APIs not available in 1 Suggestion: use a compatible library with a minSdk of at most 1, 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)

here is setup information enter image description here enter image description here

I tried adding preference name="android-minSdkVersion" value="19" In Config.xml (Project directory). It didn't work.

Please help me fixing this. Thanks,

Upvotes: 3

Views: 7894

Answers (5)

Bravery and stupidity
Bravery and stupidity

Reputation: 21

Change the cdvMinSdkVersion in gradle.properties

Upvotes: 0

Rohit Verma
Rohit Verma

Reputation: 11

I had same issue when building my app with Ionic. I solved it by making changes to gradle.properties(Project Properties) file. Change the cdvMinSdkVersion to the min targeted version which in my case was 22 then click on sync project. After build or run the project.

cdvMinSdkVersion=22

This worked for me too.

Upvotes: 1

Code Mickey
Code Mickey

Reputation: 957

I had same issue when building my app with Ionic. I solved it by making changes to gradle.properties(Project Properties) file. Change the cdvMinSdkVersion to the min targeted version which in my case was 22 then click on sync project. After build or run the project.

cdvMinSdkVersion=22

Upvotes: 1

Marek
Marek

Reputation: 3575

Deleting

<uses-sdk android:minSdkVersion="19" />

inside android/CordovaLib/AndroidManifest.xml helped to resolve the issue

Upvotes: 3

Zubaria Ashraf
Zubaria Ashraf

Reputation: 85

I have not worked on Cordova, But works on Android apps development. The issue you described is because you are using library that has minSdkVersion 19. And you cannot use lower then that in your project. Change minSdkVersion in /platforms/android/app/build.gradle file. As you need to change apps minSdkVersion.

Upvotes: 0

Related Questions