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
I was having this same problem on an LG Optimus phone; adb reported that the device was there, but cordova run android --device
failed with "Failed to deploy to device; no devices found". Turns out that of the four connection modes available on the phone:
The only one that works is Internet connection -> Modem
Hope this saves someone some hair-tearing. :)
What worked for me was changing the device from a media device to camera in the USB settings.
If you have only one device attached, phonegap run android --device
is enough.
On windows I needed to install device drivers for my phone (Moto G) from the Motorola site. Updating the SDK, Google USB drivers etc didn't make any difference; every time I did adb devices
there was nothing shown.
After I installed the Motorola drivers locally the device showed up.
I had this same issue but for a different reason. Here's how I solved it...
Working on the same project from two machines could cause a conflict when installing the app from the second machine. Either uninstall the app from the phone and fresh install or change the widget ID. Hope this helps someone, the PhoneGap CLI doesn't explicitly give an error telling this.
I had similar problem. I cloned code from git and the phonegapp did not install app in my device (LG Nexus 4). But I had another app installed in my phone with the same name and ID of the app that I was trying to install.
Removing the old app from my phone solved this problem to me.