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
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