Method one:
- open the MAC terminal, enter CD ~ enter
touch.bash_profile
[if you don’t have .bash_profile
, create this file] enter open.bash_profile
[open the file we created, a text edit box should pop up, if this is the first time to configure the environment, Write the following code in the open text editor: • export ANDROID_HOME=/usr/local/opt/android-sdk
• export PATH=${PATH}:${ANDROID_HOME}/tools
• export PATH=${PATH}:${ANDROID_HOME}/platform-tools
- note that
in [4] ANDROID_HOME
should be filled in according to its own SDK path, the rest can be copied directly. As for the SDK path, you can open Android Studio and view in the Preference [Android SDK] and enter source.bash_profile
in the terminal and enter adb [verify that the configuration is complete and if not show adb: command not found that the configuration is complete] Method 2:
- make sure whether to install the adb,
/Library/Android/SDK/platform - the tools/adb code> if there is, if there is a skip the following steps, directly to the last step 5; Open [Android Studio]; Open the SDK Manager check 】 【 SDK Platform - the Tools), run the following command on the Mac
echo export "PATH = ~/Library/Android/SDK/Platform - the Tools: $PATH" & gt; > ~/. Bash_profile
6. Restart the terminal
after completing the above steps
Note: if ZSH is used, replace .bash_profile
with .zshenv
Quote from: https://stackoverflow.com/questions/10303639/adb-command-not-found/45063101#45063101?newreg=f632609fe6154f9580a49153cb0387e5
Read More:
- Mac command not found solution
- On the error report after the command of ADB shell error:device not A solution of found
- Android ADB command adb devices error: protocol fault (no status)
- [Solved] Mac Terminal error: command not found: telnet
- When executing shell script, $’r ‘: command not found appears
- Solution to error: no devices found in ADB command
- [solved] – bash: rabbitmq plugins: command not found or RA bbitmqctl:command not found
- Linux basic command execution error: the solution of command not found
- After adb is connected to an android phone, remount failed: operation not permitted when adb remount is a roundabout solution
- Solution not found by JPS command
- WCF-HTTP Error 404.17 – Not Found, The requested content appears to be script and will not be served…
- Android error: ADB port is occupied( adb.exe ,start-server’ failed — run manually if necessary)
- The MAC system installs MySQL client, and the error is solved_ config not found
- Terminal appears after anconda is installed on MAC (base)
- Error BC: command not found when git bash runs shell script
- MacOS WGet ‘command not found’ solution
- How to Fix adb_server_notify: ADB server connection failed
- Exception: jupyter command Jupiter notebook not found
- [Solved] adb shell error: no devices/emulators found
- “Launch” appears when eclipse C + + CDT runs the program failed.binary not found”