Can't able to run PhoneGap app in Android devi

2019-08-10 22:26发布

问题:

I have created a test PhoneGap Android App through CLI - I can able to run it to emulator but I can't able to run it to a device which is connected to through USB.

USB debugging is also enabled.

> adb devices

doesn't list the device but which lists the emulator.

Am I missing anything?

回答1:

USB driver for the device was missing. For some of the Google devices drivers are available in sdk\extras\google\usb_driver. For other brands like HTC, Samsung and others we need to get it from them and install the same. I have downloaded driver for HTC One X from their website and installed it.

Sources:

  • Using hardware devices
  • Install USB Drivers

After installation use the below command to run the PhoneGap app

cordova run android \\if project created with cordova command

phonegap run android \\if project created with phonegap command