Failed to deploy to device while deploying cordova app to a connected device

Mostafa picture Mostafa · Aug 13, 2015 · Viewed 13.1k times · Source

I am developing a Cordova app in Visual Studio 2015. I have my device "HTC One - Android" is connected to my machine and when i select to run my app on a device i get the following error:

Failed to deploy to device, no devices found.

Below screen shot for the error in VS 2015.

enter image description here

Answer

Mostafa picture Mostafa · Aug 13, 2015

To fix this error in Deploying Cordova Apps to Android devices in Visual Studio 2015, You need to enable developer options in your phone. If you are having an Android device here is how to enable developer mode on your phone:

Android 4

1) Click on Settings.

2) Click on About.

3) Click on Software Information.

4) Click on More.

5) Tap multiple times on the Build Number until the phone shows a message that you are a developer!.

Android 5

1) Click on Settings.

2) Click on About.

3) Tap multiple times on the Build Number until the phone shows a message that you are a developer!.


Once you have done that, the "developer options" will be displayed (not hidden anymore) under settings, Make sure to open that and enable USB debugging!

Enjoy.