Firebase – Crash Reporting



  • Crash Reporting seems to be an important factor nowadays, as we are less determined about what error can occur on which device model or which Android Version. There are few crash reporting tools available in the market, like ACRA, Fabrics Crashalytics, etc. But this Firebase is something different which made me to write this blog for getting started with it.
  • Firebase Crash Reporting is a comprehensive tool to receive detailed information about the Crash.

Why to switch over it ?

Yes, this is the question I always ask, which boosts me to get started with. So, here are some strong reasons:

  • You can prioritize the reports by Frequency of crash
  • You can prioritize the reports by Impact
  • You get detailed report that includes:
    • device characteristics
    • device circumstances
    • stack trace and much more
  • You can collect crash report even when app is offline..!!

Getting started


  • Android Studio 1.5 or above
  • Google Play Services 9.0.2 or above.

Add Firebase to your app

  1. Go to Firebase console and click on “CREATE NEW PROJECT”. Fill the “Project Name” and Select Country, then click on “CREATE PROJECT”
  2. Click on “Add Firebase to your Android app”
  3. Enter Package name and Debug signing certificate SHA-1(Optional) and click on “Add app” button
  4. Google-services.json file will be downloaded. Go to Android Studio and Switch to the Project view in Android Studio to see your project root directory. Move the google-services.json file you just downloaded into your Android app module root directory.
  5. The Google services plugin for Gradle loads the google-services.json file you just downloaded. Modify your build.gradle files to use the plugin.
  6. Add the following lines, to your Project-level build.gradle (/build.gradle):
    [sourcecode language=”javascript”]
    buildscript {
    dependencies {
    // Add this line
    classpath ‘’
  7. Add the following lines to the bottom of your App-level build.gradle:
    [sourcecode language=”javascript”]
    apply plugin: ‘’
  8. Add the following dependencies, to your App-level build.gradle
    [sourcecode language=”javascript”]
    compile ‘’
  9. Finally, press “Sync now”.


No code at all..!!! I am not kidding.. 🙂 Firebase Crash Reporting automatically generates reports for errors. So, just sit back and relax!


Still if you want you can generate report for testing purpose. Add below line to your activity:
[sourcecode language=”java”] Exception(“My first Firebase crash report.”));
And run the app.
According to the Firebase article:
Errors take up to 20 minutes to show up in the Crash Reporting console. Check back to see your report there.

To see the report, Go to Firebase console, Select Your Project and on the Left Side Menu, Click on Crash.

cropped 2

You will see the report as below:

cropped 1

Important Points to remember

Apart from exception), you can also play with other features like.

  • FirebaseCrash.log(String message): Enables a smart way to log. It will not be shown in Android Monitor Logcat, but it will appear in Crash Report.
  • FirebaseCrash.logcat(Log.XXX, String tag, String message): yet another way to log. This log will appear in both Android Monitor Logcat and Crash Report.


Now you see, integrating crash reporting is become now so easy. Cool, now get your hands on it. We have used firebase crash reporting in some of our applications and We are really impressed with the detailing of the reports. Though it’s in beta, you should try!

Hope you enjoyed learning Firebase Crash Reporting. Happy Firebasing 🙂

Want to work with us? We're hiring!