美文网首页
Mac 配置adb环境变量

Mac 配置adb环境变量

作者: Ello_Orld | 来源:发表于2020-01-07 09:22 被阅读0次
  1. 打开文件根目录下.bash_profile文件,编辑添加如下内容:
export ANDROID_HOME=/Users/你的用户名/Documents/develop/sdk
export PATH=${PATH}:${ANDROID_HOME}/tools
export PATH=${PATH}:${ANDROID_HOME}/platform-tools

保存退出

  1. 打开终端
source ~/.bash_profile

刷新

  1. 输入
adb version 

查看效果,返回版本号即配置成功。

如果退出终端后失效,执行以下:
进入/Users目录touch ~/.zshrc 创建
open -e ~/.zshrc 打开编辑
添加source ~/.bash_profile保存
执行source ~/.zshrc

相关文章

网友评论

      本文标题:Mac 配置adb环境变量

      本文链接:https://www.haomeiwen.com/subject/zwxractx.html