Set up Crashlytics: Android

Let’s see how we can enable live crash reporting on firebase. It’s very straightforward and can be done in a few minutes. First of all, you have to integrate firebase. It can be seen here:

For this, we have to enable Crashlytics for our app.

As you are done with the firebase setup, let’s see how we can enable Crashlytics for our app. Go to under the Quality section (left-hand nav panel) and click on that.

After clicking on crashlytics, you will see the above screen. Now click on . You will be moved to here.

Now got to your project-level and add this (version can be changed here I am using )

classpath ''

In your app-level add this

// Apply the Crashlytics Gradle plugin
apply plugin: ''

Now to initialize the crashlytics add the below lines in your app-level

// Import the BoM for the Firebase platform
implementation platform('')

// Declare the dependencies for the Crashlytics and Analytics libraries
// When using the BoM, you don't specify versions in Firebase library dependencies
implementation ''
implementation ''

Now force a crash in your application; for example, you can put the below line in your code.

Log.d("TEST", "${1/0}");

Now, as soon as a crash happens on your device, it will show this crash on the crashlytics section like below:

Great! Isn’t it. It will be immediately reflected on crashlytics. Congratulation, you have successfully enabled Crashlytics, and now you can see every crash on firebase. It is very beneficial to make your product crash-free.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store