Android TutorialAdding a FuseView to an Android ProjectAndroid 9-Patch ImagesAndroid Accessing SQLite databases using the ContentValues classAndroid Accounts and AccountManagerAndroid ACRAAndroid ActivityAndroid Activity RecognitionAndroid adb (Android Debug Bridge)Android adb shellAndroid AdMobAndroid AIDLAndroid AlarmManagerAndroid Android-x86 in VirtualBoxAndroid Animated AlertDialog BoxAndroid AnimatorsAndroid Annotation ProcessorAndroid Architecture ComponentsAndroid AsyncTaskAndroid AudioManagerAndroid AudioTrackAndroid AuthenticatorAndroid AutoCompleteTextViewAndroid Autosizing TextViewsAndroid Barcode and QR code readingAndroid Bitmap CacheAndroid Bluetooth and Bluetooth LE APIAndroid Bluetooth Low EnergyAndroid Bottom SheetsAndroid BottomNavigationViewAndroid BroadcastReceiverAndroid Building Backwards Compatible AppsAndroid ButterKnifeAndroid ButtonAndroid Callback URLAndroid Camera 2 APIAndroid Camera and GalleryAndroid Canvas drawing using SurfaceViewAndroid Capturing ScreenshotsAndroid CardViewAndroid Check Data ConnectionAndroid Check Internet ConnectivityAndroid CleverTapAndroid ColorsAndroid ConstraintLayoutAndroid ConstraintSetAndroid ContentProviderAndroid ContextAndroid CoordinatorLayout and BehaviorsAndroid Count Down TimerAndroid Crash Reporting ToolsAndroid Create Singleton Class for Toast MessageAndroid Creating Custom ViewsAndroid Creating Overlay (always-on-top) WindowsAndroid Creating Splash screenAndroid Custom FontsAndroid Dagger 2Android Data Binding LibraryAndroid Data Encryption/DecryptionAndroid Data Synchronization with Sync AdapterAndroid Date and Time PickersAndroid DayNight Theme (AppCompat v23.2 / API 14+)Android Define step value (increment) for custom RangeSeekBarAndroid Design PatternsAndroid Device Display MetricsAndroid DialogAndroid Displaying Google AdsAndroid Doze ModeAndroid DrawablesAndroid EditTextAndroid Email ValidationAndroid EmulatorAndroid Enhancing Alert DialogsAndroid ExceptionsAndroid ExoPlayerAndroid FastjsonAndroid fastlaneAndroid FileProviderAndroid FirebaseAndroid Firebase App IndexingAndroid Firebase Cloud MessagingAndroid Firebase Crash ReportingAndroid Firebase Realtime DataBaseAndroid FloatingActionButtonAndroid Formatting phone numbers with pattern.Android Formatting StringsAndroid FragmentsAndroid FrescoAndroid game developmentAndroid Gesture Detection

Android Crash Reporting Tools

From WikiOD

Remarks[edit | edit source]

The best complete wiki is available here in github.

Fabric - Crashlytics[edit | edit source]

Fabric is a modular mobile platform that provides useful kits you can mix to build your application. Crashlytics is a crash and issue reporting tool provided by Fabric that allows you to track and monitor your applications in detail.

How to Configure Fabric-Crashlytics[edit | edit source]

Step 1: Change your build.gradle:

Add the plugin repo and the gradle plugin:

 buildscript {
  repositories {
    maven { url '' }

  dependencies {
    // The Fabric Gradle plugin uses an open ended version to react
    // quickly to Android tooling updates
    classpath ''

Apply the plugin:

apply plugin: ''
//Put Fabric plugin after Android plugin
apply plugin: 'io.fabric'

Add the Fabric repo:

repositories {
  maven { url '' }

Add the Crashlyrics Kit:

dependencies {

  compile('') {
    transitive = true;

Step 2: Add Your API Key and the INTERNET permission in AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="">
     ... >



  <uses-permission android:name="android.permission.INTERNET" />

Step 3: Init the Kit at runtime in you code, for example:

public class MainActivity extends ActionBarActivity {

    protected void onCreate(Bundle savedInstanceState) {

      //Init the KIT
      Fabric.with(this, new Crashlytics());


Step 4: Build project. To build and run:


Using the Fabric IDE plugin[edit | edit source]

Kits can be installed using the Fabric IDE plugin for Android Studio or IntelliJ following this link.


After installing the plugin, restart Android Studio and login with your account using Android Studio.

( short key > CTRL + L)


Then it will show the projects that you have / the project you opened, select the one you need and click next .. next.

Select the kit you would like to add, for his example it is Crashlytics :


Then hit Install. You don't need to add it manually this time like above gradle plugin, instead it will build for you.



Capture crashes using Sherlock[edit | edit source]

Sherlock captures all your crashes and reports them as a notification. When you tap on the notification, it opens up an activity with all the crash details along with Device and Application info

How to integrate Sherlock with your application?

You just need to add Sherlock as a gradle dependency in your project.

dependencies {
    compile('com.github.ajitsing:sherlock:1.0.1@aar') {
        transitive = true

After syncing your android studio, initialize Sherlock in your Application class.

package com.singhajit.login;


import com.singhajit.sherlock.core.Sherlock;

public class SampleApp extends Application {
  public void onCreate() {

Thats all you need to do. Also Sherlock does much more than just reporting a crash. To checkout all its features take a look at this article.



Crash Reporting with ACRA[edit | edit source]

Step 1: Add the dependency of latest ACRA AAR to your application gradle(build.gradle).

Step 2: In your application class(the class which extends Application; if not create it) Add a @ReportsCrashes annotation and override the attachBaseContext() method.

Step 3: Initialize the ACRA class in your application class

    formUri = "Your choice of backend",
    reportType = REPORT_TYPES(JSON/FORM),
    httpMethod = HTTP_METHOD(POST/PUT),
    formUriBasicAuthLogin = "AUTH_USERNAME",
    formUriBasicAuthPassword = "AUTH_PASSWORD,
    customReportContent = {
    resToastText = R.string.crash_text_toast)

    public class MyApplication extends Application {
            protected void attachBaseContext(Context base) {
                // Initialization of ACRA

Where AUTH_USERNAME and AUTH_PASSWORD are the credentials of your desired backends.

Step 4: Define the Application class in AndroidManifest.xml


Step 5: Make sure you have internet permission to receive the report from crashed application

<uses*permission android:name="android.permission.INTERNET"/>

In case if you want to send the silent report to the backend then just use the below method to achieve it.


Force a Test Crash With Fabric[edit | edit source]

Add a button you can tap to trigger a crash. Paste this code into your layout where you’d like the button to appear.

    android:text="Force Crash!"
    android:layout_centerHorizontal="true" />

Throw a RuntimeException

public void forceCrash(View view) {
    throw new RuntimeException("This is a crash");

Run your app and tap the new button to cause a crash. In a minute or two you should be able to see the crash on your Crashlytics dashboard as well as you will get a mail.