18

I was trying to implement the new Firebase-Crashlytics SDK. After going through the document, I got the following error.

Could not find com.google.firebase:firebase-crashlytics-gradle:17.0.0-beta01.

Janarthanan
  • 1,651
  • 3
  • 12
  • 15

3 Answers3

19

I found the following.

Wrong : com.google.firebase:firebase-crashlytics-gradle:17.0.0-beta01.

Correct : 'com.google.firebase:firebase-crashlytics-gradle:2.0.0-beta01'

Janarthanan
  • 1,651
  • 3
  • 12
  • 15
7

To implement the new Firebase Crashlytics SDK you need to add firebase-crashlytics-gradle classpath and firebase-crashlytics dependency.

In your project-level build.gradle file, add the Crashlytics Gradle plugin:

buildscript {
    repositories {
        // Check that you have Google's Maven repository (if not, add it).
        google()
    }

    dependencies {
        // ...

        // Check that you have the Google Services Gradle plugin v4.3.2 or later
        // (if not, add it).
        classpath 'com.google.gms:google-services:4.3.3'

        // Add the Crashlytics Gradle plugin.
        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.0.0-beta02'
    }
}

allprojects {
    repositories {
        // Check that you have Google's Maven repository (if not, add it).
        google()
    }
}

In your app-level build.gradle file, apply the Crashlytics Gradle plugin:

apply plugin: 'com.android.application'

apply plugin: 'com.google.gms.google-services' // Google Services Gradle plugin

// Apply the Crashlytics Gradle plugin
apply plugin: 'com.google.firebase.crashlytics'

In your app-level build.gradle, add dependencies for Google Analytics and Crashlytics.

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

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

From here.

If you're migrating from Fabric, don't forget to update google-services.json (download it from your Firebase console). It could changed after migration. Migration is described here.

P.S. answer for future strugglers.

Eugene Babich
  • 1,271
  • 15
  • 25
1

Updating these dependencies work for me

dependencies {
        classpath 'com.google.gms:google-services:4.3.10'
        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.0'
    }
Raza
  • 57
  • 4