On How to Add Android app to Firebase Crashlytics. You have to follow the below steps. First you need to understand the importance of Crashlytics. Suppose you have a large number of active users who are using you’r application so if any error occurs you need the source of that error and debug accordingly both in development and production. So Don’t worry sit tight Firebase is there for you for debugging.
What is Firebase Crashlytics?
Firebase Crashlytics is a lightweight, realtime crash reporter that helps you track, prioritize, and fix stability issues that erode your app quality. Crashlytics saves you troubleshooting time by intelligently grouping crashes and highlighting the circumstances that lead up to them.
Add Android app to Firebase Crashlytics
- If not done in previous app you can go through this Connect your Android app to Firebase Console.
- Click on Crashlytics under Quality in Firebase console.
- Click this app is new to Crashlytics .
Add Crashlytics SDK
- In your project bild.gradle add
// Add Google's Maven repository.
// Add the Google Services plugin (check for v3.1.2 or higher).
// Add the Fabric Crashlytics plugin.
// Check that Google's Maven repository is included (if not, add it).
2. Add your app level build.gradle.
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
// Add the Fabric plugin.
apply plugin: 'io.fabric'
// (Recommended) Add the Google Analytics dependency.
// Add the Firebase Crashlytics dependency.
3. Change min Sdk version to 16 in app level build.gradle.
Add an error to report
add this code in MainActiviety.
int error = new int[-1];// add an error to listen
You can get the repository from here.
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?