Exceptions are divided into two types:
1. Compile-time exceptions
When a compile-time exception is thrown, it needs to be processed for declaration, otherwise the compilation does not pass
2. Run-time exceptions
Compile-time not detected, the runtime if thrown, the program will stop immediately
NullPointerException NULL pointer reference exception
ClassCastException type Conversion exception
IllegalArgumentException Illegal parameter exception
ArithmeticException arithmetic operation exception
Indexoutofboundsexception Subscript Out- of-bounds exception
NumberFormatException Number Format exception
SecurityException Security Exception
Android Force Close causes, common such as null pointers, classes not found, resources not found,Android API Use order error, etc.
Implementing the Thread.uncaughtexceptionhandler interface , overriding the uncaughtexception () method
[Android] Watch blogs Learn several common runtimeexception of Android