I want to test out crash report using acra
but the first step is I need to simulate a fatal crash in Android using code.
Any idea?
Select an app. On the left menu, select Quality > Android vitals > Crashes and ANRs. Near the center of your screen, use the filters to help you find and diagnose issues. Alternatively, select a cluster to get more details about a specific crash or ANR error.
Apps on Android can crash because of low storage space, too many apps running simultaneously, a weak internet connection, or not having the proper app updates installed.
Just execute this code: divide by zero
Update: Also can try this Create a method,
public void stackOverflow() { this.stackOverflow(); }
And call this somewhere/buttonClick
OR simply throw an uncaught exception
throw new RuntimeException("This is a crash");
Bingo!
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