The ANDROID_HOME error is not set and the "android" command is missing from your PATH
On startup, sudo cordova build
I installed Ubuntu 14.1 X86_64 :
[Error: ANDROID_HOME is not set and "android" command not in your PATH. You must fulfill at least one of these conditions.]
ERROR building one of the platforms: Error: /home/infra/workspaces/mobileprojectsap/platforms/android/cordova/build: Command failed with exit code 2
You may not have the required environment or OS to build this project
in mine .bash_profile
I have:
export ANDROID_HOME=/home/infra/MyPrograms/android-sdk-linux
export PATH=${PATH}:$ANDROID_HOME/tools
export PATH=${PATH}:$ANDROID_HOME/platform-tools
when i run
echo $ANDROID_HOME
appears /home/infra/MyPrograms/android-sdk-linux
Do I need to do something else? any ideas?
thank
Alejo
source to share
Do you really need to use sudo
? The problem here is that environment variables are not available unless you sudo
, if you didn't specify the option -E
on sudo
.
See here for details on how to save environment variables with sudo -E
or do
sudo visudo
Defaults env_keep += "ANDROID_HOME"
source to share