I. Pre-analysis preparatory work
1. View Memory
#adb Shell
#cat/proc/meminfo
2. View process information, real-time display of resource usage for each process in the system, similar to the Task manager for Windows
#top-N 1-d 1-m 30-t
3. The virtual memory of the view, is still not understand
#cat/proc/vmstat
4. Virtual machine information, including process, thread tracking information, which is a good place to track process and thread-specific points.
Export to current directory adb pull/data/anr/traces.txt.
Second, analysis log
1. Find keywords
By looking for: "Null", "Error" "" "" e/"," Fatal "," NullPointerException "," Build Fingerprint: "," Exception "," ANR "," dexopt ", and so on, To locate the problem
1) NULL pointer problem
NullPointerException: This directly find the Java code, first analyze why it is a null pointer, if there is no logical problem, plus a judgment can be, that is, if the empty time to assign a value or directly return
2). No catch exception problem
Exception: Captures the words to capture
3) ANR Problem
ANR: To analyze the cause, see what's causing it, and then optimize the code
Reference:
http://blog.csdn.net/hugohong/article/details/24325999
Other:
http://my.oschina.net/kylinhuang/blog/296658
Android Log Analysis