How to capture/locate and avoid bugs (ANR/Crash) in Android development

Android ANR

Application Not Responding: the application is not responding

If the main thread of the application does not complete the processing of the input event within the timeout period, or does not complete the execution of a specific operation, an ANR will occur

(The main thread did not finish specific things in a specific time)

image

Location, detection and avoidance of Android ANR or Crash

 

Android Native Crash

Native programs refer to programs that can run directly on the operating system and the processor directly executes machine code, such as files in the "/system/bin" "/system/lib" directory. These applications are all created by GCC (c/ c++) Compiled and generated. The crashes of these programs are collectively called Native Exceptions, such as null pointers, illegal pointers, program runaways, memory stomping, etc.

Native Crash is caused by the process receiving a signal.

image

Android Native Crash capture

 

Principle of Android App ANR (based on O)

https://blog.csdn.net/TaylorPotter/article/details/81432522

 

Android-ANR summary principle analysis

https://blog.csdn.net/fanxudonggreat/article/details/81840791

 

NativeCrash analysis (1)-NativeCrash principle

https://blog.csdn.net/TaylorPotter/article/details/103779294

 

Follow the official account to get more latest articles

image

Guess you like

Origin blog.csdn.net/u011426115/article/details/112078666