Manifest merger failed while adding FirebaseUI library - android

My app is targeting sdk 25, with minSdk 14, compiledSdk 25and buildToolsVersion 25.0.0
When I try to add following dependency,
compile 'com.firebaseui:firebase-ui-auth:2.3.0'
It gives: following error
Error:Execution failed for task ':app:processGoogleDebugManifest'.
Manifest merger failed with multiple errors, see logs
when I checked logs of AndroidManifest error:
It shows: uses-sdk:minSdkVersion 14 cannot be smaller than version 15 declared in library
and suggest me to add Suggestion: use tools:overrideLibrary="android.support.customtabs" to force usage.
when I am adding this, it gives various manifest merger errors.
And while finding the solution, someone suggested to chage sdk version to 26, but it also give various error.
I'm just beginner in this, so please help me out.

The error message you posted says it all:
uses-sdk:minSdkVersion 14 cannot be smaller than version 15
Change your minSdkVersion to 15 in order to use firebase-ui libraries.

As you can check here the Firebase UI-AUTH has a dependency with:
compile "com.android.support:customtabs:26.0.1"
Here you can find the official doc and you can check the same in the Manifest inside the library:
This package requires API level 15 or higher.
You can't change the minSdk required for a library and you can't have a minSdk = 14 if you use this library.
I read that it is not a option for you, but currently the minSdk=15 covers over the 99% of the distribution.
Here the updated distribution:
https://developer.android.com/about/dashboards/index.html

Related

Android Studio 3.4 Manifest merger failed : uses-sdk:minSdkVersion 1 cannot be smaller than version 14

after upgrading Android Studio to version 3.4 my project sync reports an error:
ERROR: Manifest merger failed : uses-sdk:minSdkVersion 1 cannot be smaller than version 14 declared in library [androidx.legacy:legacy-support-v4:1.0.0] C:\Users\pecana\.gradle\caches\transforms-2\files-2.1\0b6817155f227f1df719b12aa7dc1519\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 14,
or use tools:overrideLibrary="androidx.legacy.v4" to force usage (may lead to runtime failures)
I can by the way build the APK and run the application correctly (but only without instant run active). I tried to add the
<uses-sdk tools:overrideLibrary="androidx.legacy.v4"/>
to the main AndroidManifest.xml but the error still occurs.
Any idea on how to fix this ?
Thank you
As the error suggested you can also increase your project's minSdk version to 14 or above.
Go to your build.gradle(Module app) file and add the minimum SDK version like this:
android {
compileSdkVersion 28
defaultConfig {
minSdkVersion 14 or above here
}
}

Manifest Merger Failed Error: Gradle Version Issue

I am trying to create a Tinder-style swipe left/swipe right feature. But when I added the dependencies into my code I got this manifest error:
Manifest merger failed : uses-sdk:minSdkVersion 15 cannot be smaller than version 16 declared in library [com.mindorks:placeholderview:0.7.1] /Users/cassandracampbell/.gradle/caches/transforms-1/files-1.1/placeholderview-0.7.1.aar/e4aa1d0fe45df90e4bd68b2aac33a24e/AndroidManifest.xml as the library might be using APIs not available in 15
Suggestion: use a compatible library with a minSdk of at most 15,
or increase this project's minSdk version to at least 16,
or use tools:overrideLibrary="com.mindorks.placeholderview" to force usage (may lead to runtime failures)
How can I fix this?
You are using this library com.mindorks:placeholderview:0.7.1 whose minimum sdk is 16. So in order to use this library your minimum sdk should also be 16. Just change the minimum sdk in your gradle to 16 and it will work.
According to error message:
Manifest merger failed : uses-sdk:minSdkVersion 15 cannot be smaller than version 16 declared in library [com.mindorks:placeholderview:0.7.1]
You need to change your minSdkVersion 14 to 16 in your app/build.gradle . I.e.
defaultConfig {
...
minSdkVersion 16
...
}

Manifest merger failed : uses-sdk:minSdkVersion 11

I really don't know what's the problem, I always get this error when I try to build my project
Error:Execution failed for task ':app:processReleaseManifest'.
Manifest merger failed : uses-sdk:minSdkVersion 11 cannot be smaller than version 14 declared in library [com.google.android.gms:play-services:10.2.0] C:\Users\AYOUB\Desktop\Boiling ball studio\app\build\intermediates\exploded-aar\com.google.android.gms\play-services\10.2.0\AndroidManifest.xml
Suggestion: use tools:overrideLibrary="com.google.android.gms.play_services" to force usage
As stated in the error; you should update your minimum version from 11 to 14.
Google Play services need at least Android version 14 (4.0) to work.
Check this link from Google
Manifest Merger occurs when there is a mismatch in a version of your dependencies. So be careful to mention the version of your dependencies to be same.
And also make sure that the version is same in all the external libraries or a module, you are using.

Wikitude: uses-sdk:minSdkVersion 14 cannot be smaller than version 15 declared in library [:wikitudesdk:]

I'm trying to build a cordova android app with wikitude plugin. When I build the project using cordova build, I got an error:
Manifest merger failed : uses-sdk:minSdkVersion 14 cannot be smaller than version 15 declared in library [:wikitudesdk:]. I tried several answers here: Manifest merger failed : uses-sdk:minSdkVersion 14, but they didn't solve my problem.
Currently, my portion of build.gradle looks like:
dependencies {
// do not use dynamic updating.
compile 'com.android.support:appcompat-v7:20.+'
}
and I changed my AndroidManifest.xml to force the minsdkversion set to be 15:
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="23" />
anybody has ideas to solve this?
Sorry, my bad, I shouldn't change the:
~\<Project>\platforms\android\build\intermediates\exploded-aar\wikitudesdk\AndroidManifest.xml.
Instead, I just changed the version in ~\<Project>\platforms\android\AndroidManifest.xml and it works. Also, there's no need to change the dependencies in build.gradle if you are using the latest version. It should be a quick and easy fix.

Minimum sdk for Facebook sdk

I had the common errors like when trying to setup the fb sdk such as ANDROID_BUILD_SDK_TOOLS ERROR and getbootclasspath() method error
but some of the solutions that people posted on SO has the minimum sdk as 14, instead of 9 (which is shown on the fb's guide). Now in my app's build.gradle file, if I use minSdkVersion 9 instead of 14, it wont work and it will say:
Execution failed for task ':app:processDebugManifest'.
Manifest merger failed : uses-sdk:minSdkVersion 9 cannot be smaller than version 14 declared in library
I have researched, but couldn't find the solution for using 9 because I want to support the app on Gingerbread.
If anyone has this kind of error
"uses-sdk:minSdkVersion 14 cannot be smaller than version 15"
Just downgrade FacebookSDK to 4.5.0
compile 'com.facebook.android:facebook-android-sdk:4.5.0'
nvm I solved it. All I had to do was put this in the app's manifest file:
> <uses-sdk android:targetSdkVersion="22" android:minSdkVersion="9"
> tools:overrideLibrary="com.facebook"/>

Categories

Resources