Geeks, please accept the hero post of 2021 Microsoft x Intel hacking contest>>>
The reason for this is that Android environment variables are not configured. Therefore, you need to configure environment variables for Android SDK in MAC
Start the terminal of MAC
Enter the home directory of the current user
Enter echo $home on the command line
Create. Bash_ Profile file
Command line input touch. Bash_ profile
Open.bash_ Profile file
Command line input Open – e.bash_ Profile after entering this command line, the. Bash will pop up automatically_ Edit window of profile file
In. Bash_ In the profile file, enter export path =/users/your user name/file path/platform tools /: $path
Note:
if you need to add multiple paths to the path, you need to use “:” (colon in English) to separate them
because Android and ADB commands are in different folders, the format is:
Path = ${path}: path 1: path 2
in addition, if you specify multiple paths, you don’t need to write $path at the end
for example:
export ANDROID_ HOME=/Users/*/Library/Android/sdk/
export PATH=$ANDROID_ HOME/platform-tools:$ANDROID_ HOME/tools:$ANDROID_ HOME/tools/bin
Save the file
Direct close.bash_ Profile file, you can automatically save your input
Update the environment variable you just configured
Enter source. Bash on the command line_ profile
Verify that the configuration is successful
Enter ADB, if – bash: ADB: command not found does not appear; The command parameter explanation of ADB appears. The configuration of environment variables is successful
Then execute the ADB command
Remarks:
adb kill-server
adb start-server
Similar Posts:
- Solve the problem of ADB: command not found on MAC
- [Solved] JSCH cannot run JAVA bash:java:Command not found.
- [Solved] Mac install maven Error: zsh: command not found: MVN
- [Solved] JPype Error: FileNotFoundError: [Errno 2] No such file or directory: ‘/usr/lib/jvm’
- Super detail: command not found: the scratch solution (add the scratch environment variable to Zsh under MAC)
- After installing node on MAC, enter node – V to prompt node command not found
- How to install “CONDA command not found” in MAC Anaconda
- macos -bash: yarn: command not found/-bash: cnpm: command not found
- HDFS Operate hadoop Error: Command not Found [How to Solve]
- Initialization of react native Android [How to Solve]