Track Android App Crashes Using Firebase Crashlytics

Crashes irritate the users and ruin the impression of the application while frequent crashes provoke the user to uninstall the application. Most of them might choose a competitors app and some of them might leave bad reviews on the Play Store.

Either way, the application crashes negatively affect the business. Minimizing crashes is critical in improving overall user experience and retaining them.

Best way to understand the issues in the application is by tracking crashes and solving. We need to find out if a particular crash is impacting a lot of users, get alerts when an issue suddenly increases in severity. and figure out which lines of code are causing crashes.

Firebase Crashlytics is one such product that helps track crashes in realtime, understand the severity, get a glimpse of user composition affected by the crash, stack trace to resolve the crash and more.

Before we start integrating the Firebase Crashlytics, we need to add Firebase to our project. Once we have added Firebase, adding Firebase Crashlytics to our project can be done in three simple steps.

First, add the Crashlytics Gradle plugin dependency to the project level build.gradle file under the buildscript block.

classpath ''

Next, apply the plugin in the app level build.gradle file.

apply plugin: ''

Finally, add the Crashlytics dependency in the app level build.gradle file.

implementation ''

That's it. In case if we want to track the NDK crashes then we need to follow additional steps.

Add the firebaseCrashlytics extension inside the release build type.

firebaseCrashlytics {
nativeSymbolUploadEnabled true
strippedNativeLibsDir 'build/stripped'
unstrippedNativeLibsDir 'build/unstripped'

Update the Crashlytics dependency in the app level build.gradle file with the following one.

implementation ''

Create a version, upload the app to the Play Store and crashes will appear in your Firebase Crashlytics console.

Popular posts from this blog

Add Spacing to Recycler View Linear Layout Manager Using Item Decoration

How to Set an Android App as a Default Dialer

How to Read Metadata from AndriodManifest File

Use Kotlin Android Extensions to Replace findViewById

How to Change Material Chip Text Size, Text Style and Font