With the Firebase Crashlytics SDK, the documentation explains how you can force a crash
However, in the line:
Crashlytics.getInstance().crash();
Crashlytics is unrecognized and cannot be imported.
I tried switching to FirebaseCrashlytics.getInstance() but there is no crash() method.
Note: Crashlytics is indeed set up properly - I am able to cause my own crash by looking up a view that does not exist and it is reported correctly.
Firebase Crashlytics is a lightweight, realtime crash reporter that helps you track, prioritize, and fix stability issues that erode your app quality. Crashlytics saves you troubleshooting time by intelligently grouping crashes and highlighting the circumstances that lead up to them.
We have deprecated the force crash method in the new SDK. One example of a way to force a crash is manually throwing an exception
throw new RuntimeException("This is a crash");
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