ikhsannetwork
ikhsannetwork

Reputation: 103

How to add platform android (cordova) on Mac

i have follow the instructions.phonegab docs and How to add android to cordova platform? PATH error? export PATH

my .bash_profile:

export PATH=/usr/local/bin:$PATH
export PATH=$PATH:~/Development/adt-bundle-mac-x86_64-20140321/sdk/platform-tools
export PATH=${PATH}:~/Development/adt-bundle-mac-x86_64-20140321/sdk/platform-tools:~/Development/adt-bundle-mac-x86_64-20140321/sdk/tools
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
eval "$(rbenv init -)"

but still Error while i executing cordova platform add android or ionic platform android:

Error: The command "android" failed. Make sure you have the latest Android SDK installed, and the "android" command (inside the tools/ folder) is added to your path.

Any Solutions? thank you

Upvotes: 1

Views: 3667

Answers (3)

novalagung
novalagung

Reputation: 11502

Try to run android in command line. if the command is not found, it's mean that the path of android sdk that registered is still wrong

Upvotes: 2

ikhsannetwork
ikhsannetwork

Reputation: 103

Thank you All for your clue of solutions. I try add $HOME because /Development directory in /Home directory and i followed code RVM in my .bash_profile:

`[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
eval "$(rbenv init -)"`

The solutions in How to add android to cordova platform? PATH error? i followed symbol ~ for initialize /Development directory in /Home directory, but it's not working. and I try follow code RVM in my .bash_profile use $HOME.

this is my .bash_profile:

 export PATH=${PATH}:$HOME/Development/adt-bundle-mac-x86_64-20140321/sdk/platform-tools:$HOME/Development/adt-bundle-mac-x86_64-20140321/sdk/tools
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
eval "$(rbenv init -)"

and then run command source ~/.bash_profile. Solved

Upvotes: 0

Yogesh
Yogesh

Reputation: 11

AndroidDev PATH

export PATH=${PATH}:~/android-sdk-linux/tools

export PATH=${PATH}:~/android-sdk-linux/platform-tools

You have to manually reload your setting like for Ubuntu I am using this command "$ source ~/.bashrc"

Upvotes: 1

Related Questions