当前位置:首页 > 操作系统 > MacOs

macOS 在终端中使用 adb命令,每次都要source ~/.bash_profile 才生效

macOS下已经配置好Android开发环境,环境变量也添加了,但是在终端中使用adb命令每次都需要source .bash_profile之后才能识别,

否则就提示  zsh: command not found: adb

 

解决方案:
1、查看根目录下是否有.zshrc文件,如果没有就新建一个 touch .zshrc
2、打开这个文件 open -e .zshrc
3、在后面添加   # Enable my profile
  source ~/.bash_profile
4、保存
5、输入source .bash_profile,是配置生效   然后就可以愉快的使用adb命令了。

 

macOS 在终端中使用 adb命令,每次都要source ~/.bash_profile 才生效

标签:环境   android开发   使用   输入   androi   需要   变量   open   生效   

本文系统来源:https://www.cnblogs.com/diyishijian/p/11883113.html


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!

相关教程推荐

其他课程推荐