Android log Learning

Source: Internet
Author: User

Android log Learning

When will log files be generated?

1. The program unexpectedly exits the Uncaused Exception.

2. The program forces Force Closed (FC) to close ).

3. The program does not respond to Application No Response (ANR ).

When Will ANR be generated?

1. Interface operations (such as Button clicking events) Wait for more than 5 seconds.

2. the execution time in the HandleMessage callback function exceeds 10 seconds.

The Log file directory is in/data/log

The Log file consists of three parts:

1. Basic System Information (memory, CPU, process queue, virtual memory, garbage collection, etc)

2. event information (mainly analyzed)

3. Virtual Machine information, process and Thread tracking information (Dalvik Thread)


How to understand the meaning of Android phone log

Log analysis is available in every programming language. What language do you learn.

How can I use Log output developed by Android and install it?

Android Log does not need to be installed. android is built in. To enter Log information, you only need Log. v ("tag name", "output information"); or Log. I ("tag name", "output information"); Log. e ("tag name", "output information"); Log. d ("tag name", "output information"); Log. w ("tag name", "output information"); then, your output information is displayed in Logcat. The Logcat view can be opened as follows: window-> show view-> others...-> select Logcat-> OK

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.