How to crash an Android app programmatically?

Solution 1:

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!

Solution 2:

  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.

Solution 3:

Don't declare activity in the Android Manifest .