android--Real-Machine Debug program method

Source: Internet
Author: User

Here's how:


(1) The phone is connected to the phone via a data cable.

(2) Set up in Phone: set-up application--Development-->USB debugging

(3) In the CMD test, the connection is normal, cmd command as follows:

ADB devices Enter

If your device name is displayed, the connection is OK.

(4) Rewrite androidmanifest.xml
   <application                  android:icon= "@drawable/ic_launcher"                  android:label= "@string/app_name"                   android: Debuggable= "true" >

(5) Perform a real-machine debug operation:

Right-click Project-->debug as-->debug configurations-->target tab in Eclipse-Select manual

Click below debug--> to select your device-->ok
(This effect is only after rebooting the system)

Your device will begin to execute your Android app! Very smooth.

Next time you want to debug, you can click Run and select your device, then OK.

(6) Note: Regardless of whether you use eclipse
Any Android software that has an exception running on the real machine can be viewed under the command-line window for specific exceptions.

Input in cmd: adb logc at enter

if it is a window system, you will be prompted to install the driver, Select the correct Android SDK installation directory, and then click Next, the system will start to install the driver.

android--Real-Machine Debug program method

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.