Recently learned Android development, after installing the ADT development environment, start the simulator, slow to die, completely inferior to the use of Apple, can't, buy an Android phone, ready to debug the program online. Did not expect in this process, met a lot of pits, as a newcomer, every step has to pass, spent nearly 2 hours, in the almighty Baidu check n many times, eventually conquered. Here, to make a record, I hope you do not walk the detour I have traveled.
1, make sure that your Android device is really linked to the computer, I have encountered a pit here, for a long time, only to find the line can be charged, do not pass the data past. So don't think take a line, can charge, can transmit data, I was so silly to take the root can not use the data line debugging for half a day.
Method: Download a androidfiletransfer.dmg, after installation, to see if you can read the phone data, assuming that the read, OK, congratulations, the first step is complete.
2 Set up your machine's environment variables, (this I introduced in the previous post, we can turn forward).
3
The first step: View USB Device information (I'm using Meizu mx3)
In terminal input: System_profiler spusbdatatype able to view information for connected USB devices
For example, my USB information such as the following (part of the content):
M351:
Product Id:0x4e26
Vendor ID:0X18D1 (Google Inc.)
version:2.33
Serial NUMBER:351BBJHCBWT6
Speed:up to 480 Mb/sec
Manufacturer:meizu
Location ID:0X1A120000/4
Current Available (MA): 500
Current Required (MA): 2
The vendor id:0x18d1 is very important, write it down.
Step Two: Create, change, Adb_usb.ini files
Input: VI ~/.android/adb_usb.ini command, in the open Adb_usb.ini file to add? 0x18d1, (then save exit)
Then be sure to restart the Finder: mouse click the Apple flag in the upper left corner of the form-force quit-->finder--> again to start
Step Three: Restart ADB
ADB kill-server
ADB start-server
ADB devices
You'll be able to see the list!
Note that the device above is not successful until it appears
Suppose that the log in ADT encounters the following problem:
[2011-07-27 10:31:48-devicemonitor]adb connection error:eof
[2011-07-27 10:31:48-devicemonitor]connection attempts:1
[2011-07-27 10:31:49-devicemonitor]connection attempts:2
[2011-07-27 10:31:50-devicemonitor]connection attempts:3
[2011-07-27 10:31:51-devicemonitor]connection attempts:4
Don't panic, restart eclipse.
After the above steps are complete, open the emulator interface
Congratulations, the Gaocheng.