Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Crashlytics class not recognized with Firebase Crashlytics SDK

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.

like image 935
galaxigirl Avatar asked Feb 25 '20 18:02

galaxigirl


People also ask

What is Crashlytics SDK?

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.


1 Answers

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");
like image 84
Todd Burner Avatar answered Oct 05 '22 06:10

Todd Burner