VS 2013 Multi Device Hybrid App Failed to deploy t

2019-05-22 07:12发布

问题:

I use the new VS 2013 phonegap/cordova template to create hybrid apps.

It all works fine using emulators and the ripple media emulators but when i connect my phone to it . I get a error saying that (See screenshot)

ERROR: Failed to launch application on device: ERROR: Failed to install apk to device: ERROR: Failed to deploy to device, no devices found. BlankCordovaApp1

Below were the steps i tried to resolve

http://blog.falafel.com/running-cordova-multi-device-hybrid-app-from-visual-studio-on-android-device/

I use a Alcatel one tocuh X+ phone see below for the device driver installed and up to date.

Also the Environment variables set are also shown below

I have even tried to edit the android_winusb.inf file too to include its hardware ids

Still no go . Anything that i am doing here or missing here ?

回答1:

The problem was indeed with the mode of "USB computer connection" which should be selected as "PTP Camera" for the device to be recognized along with the below steps

  1. Without Driver the Device Manager screen

The device on performing the command "adb devices" might still show "unauthorized" please follow the steps described in the link https://stackoverflow.com/a/25546300/581157



回答2:

Open a command prompt and enter:

adb devices

This should print out a list of attached Android devices, your device must be there for VS to find it.

adb.exe is part of the Android SDK, so if your path does not find it, you can look in /platform-tools/



回答3:

Make sure that the environment variables are added to the SYSTEM path, rather than just your local user path.



回答4:

I solved this by going into developer options and turning ON USB debugging.