I am new to Ubuntu and trying to create an ionic project. When I try to build my project with:
ionic build android
It says
Error: Failed to find 'ANDROID_HOME' environment variable. Try setting setting it manually.
Failed to find 'android' command in your 'PATH'. Try update your 'PATH' to include path to valid SDK directory.
I googled about it and found that I need to set the environment variable that refers the sdk path. Some say to set it in the .profile
file and some say to set it in .zshrc
file (I am using zsh
as my shell). But neither works for me.
Can anyone tell me what an environment variable is and how I would set it? I have only basic knowledge in Ubuntu. I am using Ubuntu 14.04 LTS.
ANDROID_HOME=/path/to/sdk
orexport ANDROID_HOME=/path/to/sdk
?ionic build android
from? Are you sure the path is correct?export ANDROID_HOME='/path/to/sdk'
in~/.zshrc
should have worked for all interactive shells (in the console, in a terminal etc).