Ask Your Question
1

How can I fix the error "zsh: command not found: adb" on my Mac OS?

asked 2023-06-11 10:42:11 +0000

djk gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
3

answered 2023-06-11 11:03:02 +0000

david gravatar image

To fix this error, you can follow these steps:

  1. Check if adb is installed on your Mac by typing which adb in your terminal. If it is installed, the terminal will display the path to the adb executable file. If not, move on to

  2. Install the Android SDK Platform Tools. You can download it from the Android Developer website: https://developer.android.com/studio/re…. Once downloaded, extract the files from the zip folder and move them to a folder of your choice, such as /Users/<your username>/android-sdk/platform-tools.

  3. Add the path to the adb executable file to your PATH environment variable. To do this, open your terminal and type nano ~/.zshrc to open the .zshrc file. Add the following line to the file: export PATH=/Users/<your username>/android-sdk/platform-tools:$PATH. Then save and exit the file by pressing ctrl + x, then y, and then enter.

  4. Reload your .zshrc file by typing source ~/.zshrc in your terminal.

  5. Check if adb is now installed by typing which adb again in your terminal. The terminal should now display the correct path to the adb executable file.

If you still encounter the same error after following these steps, try restarting your terminal and/or your Mac.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-06-11 10:42:11 +0000

Seen: 21 times

Last updated: Jun 11 '23