user12426457
user12426457

Reputation:

Manifest merger failed on dependency com.google.firebase:firebase-analytics:17.2.2

I'm trying to update my project to the lastest firebase versions but I got this error: Manifest merger failed :

Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
    is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
    Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:28:5-423:19 to override.

on implementation 'com.google.firebase:firebase-analytics:17.2.2'

also my project has this dependencies from google and firebase would it effect?

 implementation 'com.google.android.gms:play-services:12.0.1'
    implementation 'com.google.android.gms:play-services-analytics:12.0.1'
    implementation 'com.google.android.gms:play-services-maps:12.0.1'
    implementation 'com.android.support:multidex:1.0.3'
    implementation 'com.google.firebase:firebase-core:12.0.1'
    implementation 'com.google.firebase:firebase-ads:12.0.1'
    implementation 'com.google.firebase:firebase-messaging:12.0.1'

    //noinspection OutdatedLibrary
    implementation 'com.google.firebase:firebase-analytics:17.2.2'
    implementation 'com.google.firebase:firebase-crash:12.0.1'
    implementation 'com.google.firebase:firebase-config:12.0.1'
    implementation 'com.google.firebase:firebase-auth:12.0.1'
    implementation 'com.google.android.gms:play-services-auth:12.0.1'


    // Add dependency
    implementation 'com.crashlytics.sdk.android:crashlytics:2.9.5'

and here gradle and google services versions

classpath 'com.google.gms:google-services:4.3.2' classpath 'io.fabric.tools:gradle:1.28.0'

Upvotes: 1

Views: 566

Answers (1)

Peter Haddad
Peter Haddad

Reputation: 80924

You need to update to AndroidX, the following dependency:

implementation 'com.google.firebase:firebase-analytics:17.2.2'

with the above version require your application to use AndroidX.

Upvotes: 1

Related Questions