I am trying to figure out how to use Crashlytics from Fabric for my React Native Android APP. I followed the steps on the Fabric homepage and added some lines in my build.gradle files. But the builds always crash.
Is there a difference using Crashlytics for React Native Android and Crashlytics for Native Android development using Android Studio and Java?
For the newer versions of React Native you have to import Bundle and place your own onCreate Method like this:
// Added Bundle to use onCreate which is needed for our Fabrics workaround
import android.os.Bundle;
..........
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Fabrics
Fabric.with(this, new Crashlytics());
}
Not sure if this is good or not since they have removed the onCreate but it works for me
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With