Mac 下配置Android adb命令

来源:互联网 发布:我是一名淘宝差评师 编辑:程序博客网 时间:2024/05/29 17:02

在Mac 下配置Android SDK的adb命令添加到环境变量:

1. 检查 .bash_profile

使用 vim .bash_profile 打开该文件,如果该文件存在则直接进入如下第二个步骤,如果该文件不存在,可通过下面命令创建.bash_profile:

touch .bash_profile

2. 编辑 .bash_profile

打开.bash_profile文件,进行编辑,命令如下:
vim .bash_profile
添加如下内容, 以下是我的sdk的路径,具体路径根据自己sdk路径稍作改动即可;

export PATH=${PATH}:/Users/cjl/Library/Android/sdk/platform-toolsexport PATH=${PATH}:/Users/cjl/Library/Android/sdk/tools

3. 保存 .bash_profile

esc 键后退,然后输入 :wq 后保存退出;

4. 更新配置

source .bash_profile
0 0
原创粉丝点击