Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run phonegap application on Android device

Sorry if this question is vague.

When I try to get my Phonegapp application onto an Android device to test, it does not work.

It works fine on iOS.

I have searched the web and everything suggested is not working for my problem.

I am running the command:

adb devices

This returns:

List of devices attached 
BX90374LPY  device

I am then running:

phonegap run android --device=BX90374LPY

This results in:

Unknown platforms: BX90374LPY

If I run:

phonegap run android --device

I get:

[phonegap] executing 'cordova run android --device'
[phonegap] completed 'cordova run android --device'

But nothing happens on my device.

What am I doing wrong, or missing?

Thank you in advance.

EDIT / UPDATE

It seemed I was having a problem with my $PATH variable for ANDROID_HOME

Here's what fixed it for me:

Open you bash profile:

open -e .bash_profile

Then add this to the file when it opens:

export ANDROID_HOME=/usr/local/Cellar/android-sdk/24.1.2
export PATH=$ANDROID_HOME/tools:$PATH

Save this file, and restart terminal. Job Done.

like image 648
Alan Avatar asked May 18 '26 11:05

Alan


1 Answers

Try using phonegap run android --verbose and it should give you more details on the problem.

like image 164
dwb Avatar answered May 21 '26 00:05

dwb



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!