Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
125 views
in Technique[技术] by (71.8m points)

Why is Eclipse's Android Device Chooser not showing my Android device?

I am using the Android plugin for Eclipse, and when I try to run my program using a real device through the Android Device Chooser, my phone is not listed as a device. I have updated Eclipse, all of the Android packages, and the USB driver, but it still isn't showing up. My phone is running Android 2.1, which is also the target version listed in the Eclipse project.

Also it happens that the device shows up as an unknown target and the serial number as question marks as shown in the screenshot.

Android Device Chooser

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Did you try from your command line (assumed linux)

adb devices

If you got a lot of question marks

List of devices attached
??????????????    device

Check what is the vendor ID of your device:

lsusb 
> Bus 003 Device 006: ID 04e8:689e Samsung Electronics Co., Ltd 

Vendor ID is '04e8' in this case.

You need to add your device to USB list

sudo vim /etc/udev/rules.d/51-android.rules

and put this line (use your own vendor ID).

SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", MODE="0666"

Alternatively try the following syntax as pointed out by mcordaro and Yekmer Simsek referring to the documentation

SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666", GROUP="plugdev"

save it, and then

sudo chmod a+r /etc/udev/rules.d/51-android.rules
sudo service udev reload

and it should work now.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...