How to use a real machine to debug Android applications

Source: Internet
Author: User
Tags acer

This articleArticleThis section describes how to use a real machine to debug Android applications.Before proceeding, we need to clarify one thing: using a real machine to debug Android applications is very necessary and can be said to be necessary! The main causes include but are not limited to the following:
1) The simulator cannot simulate all functions of the mobile phone. For example, the simulator does not support USB connections, video capturing, audio input, Bluetooth, etc. If some function simulators in your application cannot be simulated, you can only use a real machine for testing;
2) If the application you developed is about to be released, you must test it on a real machine. Imagine how the application you developed won't even be used or used by yourself. How can we ensure that others will like it?
3) if you think the simulator runs very slowly, you can try to buy a real machine for development and testing.

Well, no matter which reason you want to debug the Android app through a real machine, at least our goal is the same. The following are the steps required to debug the Android Application on a real machine:
Install USB driverProgram
If you just want to copy files from your computer to your phone's memory card, you only need to connect your phone to your computer through the USB cable. In this case, you do not need to install the driver; but if you want to use a real machine to debug the application, you must install the USB driver. Below is the original article in the official API documentation:
"If you are developing on Windows and wowould like to connect an Android-powered device to test your applications, then you need to install the appropriate USB driver. "
Where can I download the USB driver that my mobile phone can use? Download from the official website of your mobile phone manufacturer. Below are some drivers provided by mobile phone manufacturers. Find your mobile phone manufacturer, download the corresponding driver, and install it on your computer.
Acer Http://www.acer.com/worldwide/support/
Dell Http://support.dell.com/support/downloads/index.aspx? C = US & cs = 19 & l = en & s = DHS &~ Ck = anavml
Foxconn Http://drivers.cmcs.com.tw/
Fujitsu Toshiba Http://www.fmworld.net/product/phone/sp/android/develop/
Garmin-ASUS Https://www.garminasus.com/en_US/support/
HTC Http://www.htc.com/
Click on the support tab to select your products/device. Different regions will have different links.
Huawei Http://www.huaweidevice.com/worldwide/downloadCenter.do? Method = List & flay = Software
KT tech Http://www.kttech.co.kr/cscenter/download05.asp
Kyocera Http://www.kyocera-wireless.com/
LGE Http: // www.lg.com/us/mobile-phones/mobile-support/mobile-lg-mobile-phone-support.jsp
Motorola Http://developer.motorola.com/docstools/
Pantech Http://www.isky.co.kr/cs/
Samsung Http://www.samsung.com/us/support/downloads
Sharp Http://k-tai.sharp.co.jp/support/
SK telesys Http://www.sk-w.com/service/wDownload/
Sony Ericsson http: // developer/
ZTE Http://www.zte.com.cn/cn/

Enable USB debugging on your phone
On the mobile phone, choose "menu"> "Settings"> "application"> "Development", and then select "USB debugging ", in this way, the USB debugging mode of the mobile phone is enabled.
Note: If you want to use "91 mobile assistant", "Bean Sprout" and other mobile synchronization software, you also need to set it like above (Enable USB debugging ).

Connect your phone to your computer using a USB cable
This step is the simplest.

Perform real-machine debugging
Start eclipse, right-click the android project that requires real-machine debugging, and select "Run as"-"Open Run dialog... ", on the right side of the pop-up" run "window, click the" target "tab and select" Manual "in" development target selection mode ", click "Apply"-"run", select a real device in the pop-up "Android device chooser" window, and click "OK" to start debugging.
As shown in:


In the "Serial Number", it is easy to distinguish which is a real machine device. For example, "shobrrt0785" represents a true machine device.

[Note] When debugging on a real machine, if an exception occurs when the software runs on the real machine, you can also view the exception log information in eclipse logcat.

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.