How to enable Firebase Crash Reporting - Android
<p>I followed all the steps on the docs to use Firebase Crash Reporting in my Android app (I use Android Studio and everything is up-to-date).</p>
<p>I used their own code to throw an exception to see if it works:</p>
<pre><code>try {
    throw new NullPointerException();
} catch (NullPointerException ex) {
    FirebaseCrash.logcat(Log.ERROR, TAG, &quot;NPE caught&quot;);
    FirebaseCrash.report(ex);
}
</code></pre>
<p>And the console gives me this log:</p>
<blockquote>
<p>E/MainActivity: NPE caught</p>
<p>V/FirebaseCrash: Firebase Crash Reporting is disabled.</p>
</blockquote>
<p>Here is one build.gradle</p>
<pre><code>// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.1.0'

        // Firebase - Google Services 3.0.0
        classpath 'com.google.gms:google-services:3.0.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
</code></pre>
<p>Here is the other build.gradle</p>
<pre><code>apply plugin: 'com.android.application'

android {
    compileSdkVersion 'android-N'
    buildToolsVersion '24.0.0-rc2'

    defaultConfig {
        applicationId &quot;com.app.test&quot;
        minSdkVersion 19
        targetSdkVersion 'N'
        versionCode 1
        versionName &quot;1.0&quot;
    }
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            useProguard true
        }
    }
}

dependencies {
    compile 'com.android.support:support-v4:24.0.0-alpha1'
    compile 'com.android.support:appcompat-v7:24.0.0-alpha1'
    compile 'com.android.support:design:24.0.0-alpha1'
    compile 'com.google.firebase:firebase-core:9.0.0'
    compile 'com.google.firebase:firebase-analytics:9.0.0'
    compile 'com.google.firebase:firebase-crash:9.0.0'
    compile 'com.google.firebase:firebase-messaging:9.0.0'
    compile 'com.google.firebase:firebase-config:9.0.0'
    compile 'com.google.firebase:firebase-invites:9.0.0'
    compile 'com.google.android.gms:play-services-appindexing:9.0.0'
}

apply plugin: 'com.google.gms.google-services'
</code></pre>
<p>I also use:</p>
<pre><code>mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
FirebaseMessaging.getInstance().subscribeToTopic(&quot;news&quot;);
Log.d(TAG, &quot;Subscribed to news topic&quot;);
</code></pre>
<p>I added all dependencies that I'll need, but I'm adding one by one and testing one by one, and Notifications works, Analytics: no idea, it takes about 24 hours to update, so until it does, I don't know if is working...</p>
<p>So, the thing is how can I enable it?</p>
<p><em>NOTE: I have all of the <strong>dependencies</strong> added including the <strong>crash</strong> and <strong>core</strong> ones, also the <strong>plugin</strong> and the <strong>classpath</strong></em></p>
<p>Thank you in advanced.</p>