问题
I am working on react-native-firebase crashlytics. I am using rnfirebase starter kit. There we have crashlytics integrated with the project. Now, I want to crash my app to check the crash report.
回答1:
You need to import packages react-native-fabric and another line in initial file.
import Fabric from 'react-native-fabric';
var { Crashlytics } = Fabric;
Crashlytics.crash();
回答2:
You need to need to import the crashlytics and use crash() to do a manual crash.
import crashlytics from 'react-native-fabric-crashlytics';
Below code is help to crash your application:
crashlytics.crash();
来源:https://stackoverflow.com/questions/50641057/how-to-crash-a-react-native-android-app