How to crash an Android app programmatically?

后端 未结 13 1491
遥遥无期
遥遥无期 2021-02-05 00:37

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?

13条回答
  •  不思量自难忘°
    2021-02-05 01:03

    1. Access a view that is not defined.
    2. Access the first element of an empty list without checking.
    3. Divide by Zero.
    4. Throw the device out the window.
    5. Submerge the device in water.

提交回复
热议问题