Mac下配置环境变量文件:bash_profile

即Mac下的.bash_profile 文件的路径是 /Users/YourMacUserName/.bash_profile (如果该文件已经创建过的话)


输入 touch .bash_profile 【如果没有.bash_profile这个文件,则创建一个这个文件】

用文本编辑器,就能编辑,保存


source  .bash_profile     使我们的改动生效


测试环境变量是否配置成功,例如:

echo $ANDROID_HOME

echo $GRADLE_HOME

你可能感兴趣的:(Mac下配置环境变量文件:bash_profile)