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.
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!
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:
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.
Try a different cable, mine works with one of my cables, but not the other.
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.
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
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.
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.
Late answer, but maybe helpfull. I had to first connect the USB cable and then toggle on the USB debugging.