mac上环境变量的设置在一个名叫 .bash_profile 里面
目录在/Users/{YOUR_USER_NAME}
下面
执行 open ~/.bash_profile
写入 export ANDROID_HOME=/Users/lidong/Library/Android/sdk
export PATH=$ANDROID_HOME:$PATH
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
source ~/.bash_profile 执行保存
echo $ANDROID_HOME 查看是否设置成功