3
votes

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,

5
I am also getting this error what version of android studio are you running and have you found a fix for this issue?jphillips05
I'm using Android 3.4.Still couldn't find a fix for the issue..Nalin
did you find a fix ?Lilian Bideau
@ Lilian Bideau, no.I couldn't find a solution.If I make a any changes in android studio IDE to fix the issue, then i get errors when building the project next time in cordova environment.Nalin

5 Answers

3
votes

Deleting

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

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

1
votes

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
1
votes

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.

0
votes

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.

0
votes

Change the cdvMinSdkVersion in gradle.properties