My host is very old and it takes several minutes to start an android simulator. But thanks to the fact that there is an android real machine, debugging directly on the Android phone is also a good choice. Next I will introduce how to use Android mobile phones to debug Android applications.ProgramSteps required:(Typical Hello World Program)
1. Connect your mobile phone to your computer through a data cable
2. Set the Android phone to USB debugging mode. Steps:Choose menu> Settings> Application> development, and select USB debugging]
3. If Windows is used, the system will prompt you to install the driver:
Select the correct android SDK installation directory and click Next. The system will start to install the driver.
4,
After the driver is installed, restart the computer (the system usually prompts "install a new driver and restart it to take effect ").
5. Repeat steps 1st and 2nd to open the command window and check whether the mobile phone device has been identified, as shown below:
"Ht99ylg11834 device" is the detected mobile phone device.
6. Next, we will start debugging the android program on Eclipse,Right-click the android project and choose run as> Android Application., The following window is displayed: (this happens only after the system is restarted)
7. Select the mobile phone device, click OK, and the program will start to be installed on the real machine. The console outputs the following information:
[22:24:49-helloworld] uploading helloworld.apk onto device 'ht99ylg11834 ′
[22:24:49-helloworld] installing helloworld.apk...
[22:24:53-helloworld] success!
[22:24:53-helloworld] Starting activity com. eightqiu. activity. statsresultactivity on Device
[22:24:57-helloworld] activitymanager: Starting: intent {
Act = Android. Intent. Action. Main cat = [Android. Intent. Category. Launcher]
CMP = com. eightqiu. Activity/. statsresultactivity} 8. Run this application so that you can use your mobile phone to test it.