Android Studio 环境变量配置MAC

1.打开命令终端 open .bash_profile 如果失败 

2.输入 touch .bash_profile   再次尝试 1

3. 把如下配置考入: PS  记得更改配置路径

export PATH=${PATH}:$ANDROID_NDK_HOME

export PATH=$PATH:/usr/local/go/bin

export GO111MODULE=on

export GOPROXY=https://goproxy.io

export ANDROID_HOME=/Users/chenfeipeng/Library/Android/sdk

export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles

export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

export PATH=${PATH}:${ANDROID_HOME}/tools

export PATH=${PATH}:${ANDROID_HOME}/platform-tools

export PATH=$PATH:$NDK_ROOT

export IDEA_MAVEN=/Applications/IntelliJ\ IDEA\ CE.app/Contents/plugins/maven/lib/maven3

export PATH=$PATH:$IDEA_MAVEN/binexport PATH=${PATH}:~/Library/Android/sdk/platform-tools

export GRADLE_HOME=/Applications/Android\ Studio.app/Contents/gradle/gradle-4.10.1

export PATH=$PATH:$GRADLE_HOME/bin

export PATH=${PATH}:/usr/local/mysql/bin

export JAVA_HOME=/Applications/Android\ Studio.app/Contents/jre/jdk/Contents/Home

export PATH=$PATH:$JAVA_HOME


4. 考入完成 输入 source .bash_profile

5. 输入  echo $PATH   java -version 验证是否配置成功

你可能感兴趣的:(Android Studio 环境变量配置MAC)