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

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


Try to change com.crashlytics.sdk.android:crashlytics:17.2.2 to com.google.firebase:firebase-crashlytics:17.2.1.

This worked for me.


Steps to add the new Firebase Crashlytics before november deprecation

from your build.gradle project module

    // Remove Fabric's Maven repository from allProjects.
    maven { url 'https://maven.fabric.io/public' }

    // Remove the Fabric Gradle plugin.
    classpath 'io.fabric.tools:gradle:1.31.2'

    // Add the Firebase Crashlytics Gradle plugin.
    classpath 'com.google.firebase:firebase-crashlytics-gradle:2.2.1'

From your build.gradle app module

// Remove the Fabric plugin.
apply plugin: 'io.fabric'

// Add the Firebase Crashlytics plugin.
apply plugin: 'com.google.firebase.crashlytics'


dependencies {
  // Remove the Fabric Crashlytics SDK.
  implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'

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

The links commented with // Remove should not be in your gradle configuration, instead add the suggested dependencies and plugins

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

As a quote from Peters answer, you should also have

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.