ANR (Application Not Response) The application is not responding. When the main thread is blocked, the following pop-up window will pop up.
1. traces.txt file
Android's traces.txt file records the stack status of the process, which is very helpful for analyzing the reasons for slow application response and ANR. The location of the traces.txt file is located in /data/anr/.
2. Export traces.txt file
adb pull /data/anr/traces.txt D:/
3. Traces.txt file analysis
- The starting point is this "main"
- The last call is the destroy method, which is called by jni
- Implementation of jni layer
It can be known that the implementation of jni layer involves time-consuming operations , so we should call this method in the child thread.