2
votes

I am trying to integrate Facebook Login in my android app,but getting the error above,when trying to add compile 'com.facebook.android:facebook-login:[4,5)' in dependencies.

Error:Execution failed for task ':app:processDebugManifest'. Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(25.3.1) from [com.android.support:cardview-v7:25.3.1] AndroidManifest.xml:24:9-31 is also present at [com.android.support:appcompat-v7:26.0.0-alpha1] AndroidManifest.xml:27:9-38 value=(26.0.0-alpha1). Suggestion: add 'tools:replace="android:value"' to element at AndroidManifest.xml:22:5-24:34 to override.

enter image description here

Any solution?

2

2 Answers

3
votes

In your module's build.gradle file, put next lines:

configurations.all {
    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
        def requested = details.requested
        if (requested.group == 'com.android.support') {
            if (!requested.name.startsWith("multidex")) {
                details.useVersion '26.0.0-alpha1'
            }
        }
    }
}

This should force all your dependencies from support library to use version 26.0.0-alpha1

0
votes

Following block of code was repeated while integrating Facebook login, it was their from Account Kit integration. Removing one of them has resolved issue

<meta-data android:name="com.facebook.sdk.ApplicationId"
            android:value="@string/facebook_app_id"/>