Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Crashlytics / Fabric not reporting crashes on Android

I have some problems with Fabric/Crashlytics.

I'm using Android Studio 1.3.2

Here is my build.gradle

buildscript {     repositories {         jcenter()         maven { url 'https://maven.fabric.io/public' }     }     dependencies {         classpath 'io.fabric.tools:gradle:1.+'     } }  apply plugin: 'com.android.application' apply plugin: 'io.fabric'  repositories {     jcenter()     maven { url 'https://maven.fabric.io/public' } }  android { ... }  dependencies {     ...     compile('com.crashlytics.sdk.android:crashlytics:2.5.2@aar') {         transitive = true;     } } 

I added api key in manifest (I added meta-data com.crashlytics.ApiKey, as well as io.fabric.ApiKey).

I'm starting Fabric in Application class

Fabric.with(this, new Crashlytics()); 

The problem is that Beta is working (I can share, update, open app), Answers is working (Sessions are listed and everything), I can even log exception with

Crashlytics.logException("Test"); 

And non-fatal crashes will be added to Fabric dashboard.

But for some reason, no "fatal" crashes are reported and sent to Fabric. Can someone please help me? What could be the reason? What am I doing wrong?

Btw - this started happening after update from Crashlytics to Fabric. I reinstalled plugin, deleted app and added it again, tried without plugin for Android Studio.

like image 487
dmestrovic Avatar asked Sep 25 '15 17:09

dmestrovic


People also ask

What happened to Crashlytics?

In January 2017, Crashlytics and Fabric were acquired by Google. In September 2018, Google announces that Fabric will be deprecated and developers should use Crashlytics via Firebase.

How does Crashlytics work in Android?

Crashlytics creates a exception handler that intercepts the exceptions that weren't caught and does something with them but it also sends the exception to the previous exception handler, that's why the app stills crashes.

How do I test my android Crashlytics?

Open your app from the home screen of your test device or simulator. In your app, press the "Test Crash" button that you added using the code above. After your app crashes, run it again from Xcode so that your app can send the crash report to Firebase.


1 Answers

Make sure you're NOT setting a default uncaught exception handler (Thread.setDefaultUncaughtExceptionHandler). This was the problem I had.

like image 87
FractalBob Avatar answered Sep 28 '22 01:09

FractalBob