set the ANDROID_HOME using bash_profile. Then run the source ~/.bash_profile before running appium from terminal.