Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 794
satyender Avatar asked Mar 02 '16 07:03

satyender


5 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

like image 50
Luckylooke Avatar answered Oct 05 '22 23:10

Luckylooke


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.

like image 36
Phonolog Avatar answered Oct 05 '22 23:10

Phonolog


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

like image 39
Titan Avatar answered Oct 06 '22 00:10

Titan


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.

like image 24
Víctor Avatar answered Oct 05 '22 22:10

Víctor


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

like image 44
AncientYouth Avatar answered Oct 05 '22 22:10

AncientYouth