How to crash an Android app programmatically?
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!
- Access a view that is not defined.
- Access the first element of an empty list without checking.
- Divide by Zero.
- Throw the device out the window.
- Submerge the device in water.