mac adb prompt zsh: command not found: adb

1. Problem Analysis: Reasons why adb cannot be executed on mac

1.Use command

echo $SHELL

The format of the view command is

csh or tcsh, then it is C Shell. (before Mac OS X 10.2)

Or bash, sh, zsh, then Bourne Shell (after Mac OS X 10.2)

2. Problem fix

1. By configuring environment mac variables

echo $PATH
~/.bash_profile

After adding the android command to the user environment variable

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

Refresh configuration:

source ~/.bash_profile

Error message:zsh: command not found

2. Here you need to give a shortcut to the ~/.bash_profile file

vim ~/.zshrc

Configuration is increasing

source ~/.bash_profile

Then refresh the configuration command:

source ~/.zshrc

Execute adb command again and everything is fine

Guess you like

Origin blog.csdn.net/streetrust/article/details/123483698