Android program debugging

Source: Internet
Author: User

I. Usage of DDMS
1. logCat: displays the logs displayed when the mobile phone or simulator is running.
2. Log Level: Debug, Warning, Error, Info, V: All Information
3. Add a filter)
4. File Browser: You can view all files in the current simulator.
Ii. Common program debugging methods
1. log output:
1) java standard output System. out. println ();
Find the Error cause in the Error information of the log and find the corresponding Error location for modification.
2) use the Log class.
Log. v (tag, message)
Log. d (tag, message)
Log. I (tag, message)
Log. w (tag, message)
Log. e (tag, message)
Using these methods, you can output log information of different levels. You can add a filter using tags as the filter conditions, so that you can directly view the information of this level.
 
 

Author "sxmalinhu"

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.