How to add android platform (cordova) on Mac

I follow the instructions. phonegab docs and How to add android to the 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 am running the Cordoba platform, add the android or ionic Android platform:

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? thanks

+1
source share
3 answers

Try to run androidon the command line. if the command is not found, this means that the path to the registered android sdk file still does not match.

+2
source

AndroidDev PATH

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

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

, Ubuntu. "$ source ~/.bashrc"

+1

. $HOME, /Development /Home RVM .bash_profile:

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

Solutions in How to add android to the Cordoba platform? PATH error? I followed the character ~to initialize the directory /Developmentin the directory /Home, but it does not work. and I'm trying to execute code RVMin my .bash_profile using $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 the command source ~/.bash_profile. Solved

0
source

All Articles