Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR: Failed to resolve: com.google.firebase:firebase-crash:17.2.2

I'm trying to update my google and firebase SDK libraries in my project to solve the problem of install_referrer deprecation but I got errors after sync

ERROR: Failed to resolve: com.google.firebase:firebase-crash:17.2.2

and this error on the merged manifest

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-422:19 to override.

here is my firebase and google dependency

    implementation 'com.google.firebase:firebase-analytics:17.2.2'
    implementation 'com.google.firebase:firebase-crash:17.2.2'
    implementation 'com.google.firebase:firebase-config:19.1.1'
    implementation 'com.google.firebase:firebase-auth:19.2.0'
    implementation 'com.google.android.gms:play-services-auth:17.0.0'

    implementation 'com.google.android.gms:play-services-base:17.1.0'
    implementation 'com.google.android.gms:play-services-analytics:16.0.8'
    implementation 'com.google.android.gms:play-services-maps:17.0.0'

    implementation 'com.google.firebase:firebase-core:17.2.2'
    implementation 'com.google.firebase:firebase-ads:18.3.0'
    implementation 'com.google.firebase:firebase-messaging:20.1.0'
like image 456
Neo Avatar asked Feb 12 '20 09:02

Neo


1 Answers

Use the following dependency:

implementation 'com.google.firebase:firebase-crashlytics:17.0.0-beta01'

And Update your application to use AndroidX:

Upgrade com.android.tools.build:gradle to v3.2.1 or later.

Upgrade compileSdkVersion to 28 or later.

Update your app to use Jetpack (AndroidX); follow the instructions in Migrating to AndroidX.

https://developer.android.com/jetpack/androidx/migrate


Update:

You can now use the following dependency version:

dependencies {
    // Recommended: Add the Firebase SDK for Google Analytics.
    implementation 'com.google.firebase:firebase-analytics:17.5.0'

    // Add the Firebase Crashlytics SDK.
    implementation 'com.google.firebase:firebase-crashlytics:17.2.2'
}

If you are having trouble adding firebase-crashlytics, then check the following documentation:

https://firebase.google.com/docs/crashlytics/get-started?platform=android

https://firebase.google.com/docs/crashlytics/upgrade-sdk?platform=android

like image 156
Peter Haddad Avatar answered Oct 15 '22 22:10

Peter Haddad