Go to console

Upgrade to Firebase Crashlytics from Firebase Crash Reporting

Crashlytics is the new, primary crash reporter for Firebase. If your app uses Firebase Crash Reporting, there's good news: Crashlytics offers enhanced crash reporting with nearly the same setup process you're used to, so upgrading is straightforward:

  1. Update your project's dependencies.
  2. Migrate any log calls, if you have them.
  3. Set up manual initialization, if you used it.

Update project dependencies

  1. Add the Crashlytics repositories and dependency to your project-level build.gradle file:
    buildscript {
        repositories {
            // ...
            maven {
               url 'https://maven.fabric.io/public'
            }
        }
        dependencies {
            // ...
            classpath 'io.fabric.tools:gradle:1.30.0'
        }
    }
    
    allprojects { // ... repositories { // ... maven { url 'https://maven.google.com/' } } }
  2. Note: Crashlytics requires Google Services plugin version 3.1.2 or higher. Check the com.google.gms:google-services version number in your project's build.gradle dependencies.
  3. To update your app's depencencies for Firebase Crashlytics, make the following changes to your app-level build.gradle:
    apply plugin: 'com.android.application'
    /* Add the Fabric plugin: */
    apply plugin: 'io.fabric'
    
    dependencies {
        // ...
    
        /* Delete Crash Reporting:
        implementation 'com.google.firebase:firebase-crash:16.2.1'
    
        Add Crashlytics: */
        implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
    
        // Update your firebase-core version, if it's lower than v11.4.2
        implementation 'com.google.firebase:firebase-core:17.0.1'
    }

    Migrate logs

    If you used Firebase Crash Reporting custom logs, you have to update those for Firebase Crashlytics too:

    Firebase Crash ReportingFirebase Crashlytics
    FirebaseCrash.log() Crashlytics.log()
    FirebaseCrash.logcat() Crashlytics.log()
    FirebaseCrash.report() Crashlytics.logException()

    Set up manual initialization

    Like Firebase Crash Reporting, the Firebase Crashlytics SDK automatically initializes Crashlytics as soon as you add it to your app. If instead you initialize reporting manually, Crashlytics has a way to do that as well:

    1. Replace the Firebase Crash Reporting meta-data tag in your AndroidManifest.xml file with one for Crashlytics:
      <!-- Delete Crash Reporting:
      <meta-data
          android:name="firebase_crash_collection_enabled"
          android:value=false />
      
           Add Crashlytics: -->
      <meta-data
          android:name="firebase_crashlytics_collection_enabled"
          android:value="false" />
      
    2. Replace the initialization call in relevant activities as well:

      Java

      /*   Delete Crash Reporting:
      FirebaseCrash.setCrashCollectionEnabled(true);
      
           Add Crashlytics: */
      Fabric.with(this, new Crashlytics());

      Kotlin

      /*   Delete Crash Reporting:
      FirebaseCrash.setCrashCollectionEnabled(true)
      
           Add Crashlytics: */
      Fabric.with(this, Crashlytics())
    Note: Once initialized, Crashlytics keeps reporting crashes until the user closes the app. If you want to give users the option to opt-out of reporting after you've initialized Crashlytics, they'll have to restart your app before the change can take effect.