Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Device not detected in Eclipse when connected with USB cable

I want to run my Android project on a device.

My device is not detected in Eclipse when I connect it with a USB cable.

I restarted Eclipse and I have checked that USB debugging is on, on the device.

Can anybody tell me what the problem is and how to resolve it?

like image 428
mohan Avatar asked Nov 09 '11 09:11

mohan


People also ask

Why is my USB cable not showing up?

Reason Why a USB Flash Drive Is Not Showing UpThe drive isn't seated properly in the port. The drive isn't on (this is rare, but some some models of USB drives have a physical power switch). The USB port on computer is bad. The USB drive itself is broken.

Why is my USB not showing up on my phone?

Head to “Settings,” followed by “More Settings.” Choose “USB utilities” and press “Connect Storage to PC.” Select “Turn on USB storage.” Wait for the system to install the necessary drivers.


2 Answers

Before starting, Make sure that USB DEBUGGING IS ENABLED in your phone settings !!!

1) BASIC STEP - Plug in device via USB, then go to device page in Android developers blog. There you can find necessary information regarding adding USB vendor ids. Add your device specific ids, and restart eclipse if needed.

2)If you were able to see the device connected(using command: 'adb devices' ) earlier, but not anymore, then just try restarting ADB. (you can use the commands: 'adb kill-server' followed by 'adb start-server'. adb commands need to be executed from platform tools folder in the Android SDK, if you havent exported it).

3)If neither of them works out and you are on windows machine, then check the installed usb drivers are correct. If not install proper drivers Please find more information on how to install/update drivers in http://developer.android.com/tools/extras/oem-usb.html

If this also is not working, try installing Universal ADB windows driver https://plus.google.com/103583939320326217147/posts/BQ5iYJEaaEH

4)You may also try increasing the timeout time Go to preferences-> android->DDMS in eclipse, then try increasing 'ADB connection timeout(ms)' value

Update based on newer answers:

5)Run > Run Configurations > Target. Please make sure, the option "Always prompt to pick device" is enabled.

Special case: Windows 8 and Nexus 10 (from this question: ADB No Devices Found)

Windows 8 wouldn't recognize my Nexus 10 device. Fixed by Setting the transfer mode to Camera (PTP) through the settings dialogue on the device.

Settings > Storage > Menu > USB Computer connection to "Camera (PTP)"

like image 199
Rahul Avatar answered Oct 06 '22 00:10

Rahul


I solve this problem by updating PC portable device drivers:

Go to : Settings -> Applications -> Development to enable USB debugging

  1. Plug in device USB
  2. Desktop "My Computer" right click -> "Manager"
  3. Choose "Device Manager"
  4. Portable Device
  5. right click on your device -> "Update Driver software" -> Search automatically (wait about 3-5min, )
  6. Done
like image 44
ji_fearou Avatar answered Oct 06 '22 00:10

ji_fearou