Can't able to run PhoneGap app in Android device - android

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?

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

Related

How can I run my ionic app on a physical device (Wiko phone) on Windows?

I have a project using ionic framework, I am working in command line and I am trying to run my app on on a real device phone, a Wiko Rainbow.
I have enabled On-device Developer Options and I also have enabled USB debugging option and the target device is never recognized. I am working on Windows 7.
I have done: ionic run android
And the result:
No target specified and no devices found, deploying to emulator
Is my device phone phone compatible with ionic or am I missing sommeting ?
I manage to find the solution I had to the environnent variables path:
<my pc>\AppData\Local\Android\sdk\tools;
<my pc>\AppData\Local\Android\sdk\platform-tools;
Then I update the driver of my device thanks to this link: Android development driver for Wiko or other phone on Windows 7
A few time later my phone asked me to accept the connexion with my computer and I managed to run my application.
Then I update the driver of my device thanks to this link: Android development driver for Wiko or other phone on Windows 7
A few time later my phone asked me to accept the connexion with my computer and I managed to run my application.

adb needs an upgraded sdk to work but cordova needs a downgraded sdk. How can I make both happy?

When I type adb devices -l this is the output:
$ adb devices -l
List of devices attached
VS9854G22b261d6 offline
I think that VS9854G22b261d6 is my phone. I had to install LG drivers before that would show up.
It seems like the solution to that "offline" problem is to update the android sdk. But, cordova requires an older SDK (api version 19, right?) So how can I make both adb and cordova happy?
I'm on Windows 8.1 and I have a Verizon LG G3 device. I have enabled USB debugging on the device. When I type cordova run android it starts the emulator and deploys to that. I am expecting this to deploy onto my connected device instead of onto an emulator. The "hello world" app deploys fine to the emulator, but I'm trying to deploy it to my device and I can't figure out why it's not even trying to do that.
When I type cordova run android this is the output:
...
BUILD SUCCESSFUL
Total time: 2 seconds
Built the following apk(s):
C:\...\cordova\platforms\android\ant-build\CordovaApp-debug.apk
WARNING : No started emulators found, starting an emulator.
Waiting for emulator...
### Error: could not find emulator icon resource: android_icon_32.png
In my case, I plugged into a different USB port and then it said "unauthorized". I changed the USB connection to camera and then the device asked me to authorize it. Then adb devices said "device" and cordova run android worked as expected. Seems to be a ton of different solutions to the same problem. This is all I needed.

Deploying app in android with phonegap

I have phonegap install in my pc, the drivers of my android are installed as well
now i run:
phonegap run android
from within the project directory
"Waiting for emulator" message is recieved
how can i deploy the app directly to my android?
Seems the device is not conectect...
maybe the ADB driver is not working on the PC...
or you don't enable the USB debugging option on the device.
On the command line write: adb devices.

Cordova run android --- not deploying to my android phone connected but opening up emulator instead

Just created the basic cordova app (the Hello World app it generates), and
while
cordova emulate android
works fine on the emulator,
cordova run android
also fires up the emulator. My Samsung S5 is connected to the PC and USB debugging mode is enabled (after taping the build in settings 7 times, etc. http://www.valuewalk.com/2014/04/samsung-galaxy-s5-enable-usb-debugging-mode/ )
How to deploy it to my device directly?
Thanks
adb install path/to/local/apk
Or try with -s to install it on your phone's sd card. Apk path can be found in the build process's log, at the console.
Close the emulators first.

Trying to debug apps from eclipse on android

I am developing apps for android and I bought an bq Maxwell 2 Lite, and I wanted to test them in the device, but i can't seem to do it... can somebody help me with that?
The android version on the device is 4.1.1 and I have enabled debugging throw USB.
Thank you all for your time and thanks for all the help
Carlos Morgado
So to test with any device you need
Install the driver for the device on your OS.
Enable USB debugging on your device.
Plug-in the device through an USB.
Run the app through the IDE and select the configured device to run the application
This should help you get started.
For using USB debugging in eclipse, make sure that you have all the drivers installed. Open sdk manager, under extras you can see Google USB drivers, make sure that this is downloaded.
If after this also it didn't work, go to device management if you are using windows and find your device. Right click on your device and update device drivers, update from my computer and give this folder sdk folder\sdk\extras\google\usb_driver. Set platform-tools folder in your path variables and run these commands:
adb kill-server
adb start-server
You can see list of attached devices using this command:
adb devices

Categories

Resources