I have a react native app
that already has Firebase installed on it. I am attempting to get the Crashlytics firebase
module installed on it now.
I have gotten iOS
to build and seems to be doing some sort of reporting to the firebase
Dashboard as the dashboard no longer is prompting to install crashlytics
. For Android
I have followed these instructions: https://rnfirebase.io/docs/v5.x.x/crashlytics/android and have gotten the app to build but within the react-native code
when I try to use the API (something like firebase.crashlytics().log('hi there')
on app initialization) iOS
proceeds as expected but Android
throws
"Must Initialize Fabric before Using singleton()".
I have tried getting around this with the method here: https://github.com/corymsmith/react-native-fabric/issues/82 by adding
@Override
public void onCreate() {
super.onCreate();
Fabric.with(this, new Crashlytics());
}
/android/app/src/main/java/host/exp/exponent/MainApplication.java file
When I try to do this the app then does not build and gives me the error:
error: cannot find symbol class Crashlytics
at the line (Fabric.with(this, new Crashlytics());)
. I'm not really sure where to proceed from here so some help would be appreciated.