37

I am developing an Apache Cordova mobile app using Visual Studio 2013. When I run my app in device mode I get the following error:

ERROR: Failed to deploy to device, no devices found

I have already enabled USB debugging in the developer options. enter image description here

Phonolog
  • 6,321
  • 3
  • 36
  • 64
satyender
  • 817
  • 4
  • 12
  • 27
  • How have you connected the device to the machine? are you using a real device or an emulator? – Bhargav Mar 02 '16 at 07:51
  • 1
    i have connected android mobile(real device) via USB cable – satyender Mar 02 '16 at 07:52
  • have you checked if your android debug bridge(adb) service is running and have you added adb to PATH, and have you run the adb command to check connected devices? – Bhargav Mar 02 '16 at 07:54
  • 2
    I have two mobile one is working fine but other one shows this error. I have checked adb command its not showing any device(mobile which shows this error) and please tell me how to check adb sevice running or not – satyender Mar 02 '16 at 08:01
  • Try your question at: [Google Group of Cordova/Phonegap](https://groups.google.com/forum/#!forum/phonegap) –  Mar 02 '16 at 10:01

8 Answers8

69

I have had problem that I have got "device not found" after first working connection an next reconnection. I have found solution by closing chrome://inspect/#devices tab in chrome dev tools. Hope this help someone. Happy coding!

Credit: https://stackoverflow.com/a/36662403/861615

Luckylooke
  • 4,061
  • 4
  • 36
  • 49
35

Restart the adb server:

Try to restart your adb (Android debug bridge) server with following commands in your command line:

Path\to\adb\adb kill-server
Path\to\adb\adb start-server

On Windows, your path\to\adb might be something like C:\Users\myusername\AppData\Local\Android\sdk\platform-tools or C:\Program Files (x86)\Android\android-sdk\platform-tools depending on the installation of your Android SDK.

Afterwards, check if your device is found:

Path\to\adb\adb devices

Console output with a connected device might look like this on Windows command line: Console output of adb kill-sever, adb start-server and adb devices

Install OEM USB drivers:

If adb devices does not show any device, even after restarting your adb server, make sure you have your original equipment manufacturers (OEM) driver installed. developer.android.com offers further information on this and a list of links for all the important manufacturers.

Phonolog
  • 6,321
  • 3
  • 36
  • 64
  • 2
    That did the trick for me. Just pointing out: I use Windows and the path to ADB is `C:\Users\myusername\AppData\Local\Android\sdk\platform-tools` – Felipe Balduino Cassar Jan 22 '17 at 17:21
  • Good call, I added possible paths to the adb.exe. – Phonolog Jan 22 '17 at 19:16
  • 1
    Adding the OEM driver is what fixed it for me, thanks! (Samsung Galaxy for example, http://developer.samsung.com/galaxy/others/android-usb-driver-for-windows) – RJB Jun 27 '17 at 00:45
  • Path on mac is `~/Library/Android/sdk/platform-tools/adb`, I also had to reboot my android device itself. – Loren Sep 11 '17 at 14:27
  • Where is this on *Mac*? – Ian Steffy Apr 19 '18 at 07:39
  • For linux environments, there is no need to give adb commands with the path of adb execeutable. You can just type: adb kill-server adb start-server adb devices directly. Maybe an edit on the answer would be nice – Dimitris Papazacharias Jan 23 '20 at 12:55
10

Try a different cable, mine works with one of my cables, but not the other.

Titan
  • 5,567
  • 9
  • 55
  • 90
8

Test if your device appears when you write adb devices in your CLI

If not, just change between the different options of conection, displayed in your phone. Usually works with PTP or MTP.

When the device appears, that should work. If you can't make it appear, just check your adb path or android drivers.

Víctor
  • 3,029
  • 3
  • 28
  • 43
  • You may need to connect, disconnect and re-connect the USB cable a few times. I've had issues where devices are not always recognised on the first connection. Make sure the phone is unlocked (eg on the home screen) when you connect. – Chris Mar 02 '16 at 11:14
6

For me, there was a prompt on my phone asking me to allow USB debugging, that I needed to allow. Before that my device was showing in the CLI but with the name "unauthorised". Kind of silly I know, but maybe this might help someome

AncientYouth
  • 471
  • 1
  • 4
  • 12
0

In addition to other answers above, you may need to install the device driver manually if you're developing with a Nexus device.

See this page on the Android developer site for installing The Google USB Driver.

0

In my case, the issue happened because the driver was not installed on the computer for my Nokia Android phone. adb devices command showed no devices. I followed the steps for Windows 7 listed on Install USB driver and installed driver for Android Composite ADB Interface.

  • In windows explorer, right click on computer, then click Manage
  • Select device manager in the left pane and locate the unknown device in the right pane
  • Expand the unknown device node and right click, select "Update Driver software.."
  • Select "Browse my computer ..."
  • Select "Let me pick from a list of device drivers ..."
  • Select Android Composite ADB Interface
Atif Majeed
  • 1,021
  • 17
  • 14
0

Late answer, but maybe helpfull. I had to first connect the USB cable and then toggle on the USB debugging.

Niels Steenbeek
  • 4,692
  • 2
  • 41
  • 50