Home » Android » android – ERROR: Failed to deploy to device, no devices found -cordova using visual studio

android – ERROR: Failed to deploy to device, no devices found -cordova using visual studio

Posted by: admin April 23, 2020 Leave a comment

Questions:

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

How to&Answers:

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

Answer:

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.

Answer:

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

Answer:

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.

Answer:

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

Answer:

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.

Answer:

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