I am trying to run an app that I made in phonegap on my device, connected with USB.
-> phonegap run android
[phonegap] detecting Android SDK environment...
[p
If you have only one adb-capable device, use this command:
phonegap run android --device
If you have more than one you will need to specify the device ID this way:
phonegap run android --device=<device-id>
Example:
phonegap run android --device=SH25PW103163
phonegap run android --target=SH25PW103163
If you want to know the code of a device execute this in the console (shell, terminal):
adb devices
Just wanted to share my experience, I wasn't able to launch my cordova app on device. What solved my problem is to upload apk manually:
adb install -r platforms\android\build\outputs\apk\android-debug.apk
Finally I solved this problem with two ways and I just want to share my experience with you.
cordova run android --device
Just use
cordova run android --device
On LG G4 (on Windows OS) you need to do the following:
cordova run android --device
I´ve an LG G4, and i´m using Visual Studio Tools for Apache Cordova (TACO).
When trying to debug on device i was receiving the message: Unable to deploy to Android device, no attached device was found. If you recently attached a device, you may need to wait a few seconds before it is recognized.
And what worked for me was changing the device from the media transfer protocol (MTP) to photo transfer protocol (PTP), in the USB settings. Phone Screenshot