Programmer algorithm practice must read, common Java API skills to share>>>
When using MAC for development, sometimes you need to use the ADB instruction to perform some operations. However, if you have not configured the Android environment variables, you may encounter the problem of ADB: command not found. After checking some information, here is a record of how to configure the Android environment variables on Mac
Open the terminal terminal of the Mac and enter Cd ~/[enter the home directory of the current user]
Enter touch. Bash_ Profile [if not. Bash_ Profile, create a file]
Enter open. Bash_ Open the file we created, and a text edit box will pop up. If the environment is configured for the first time, the text edit box will be blank
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 the Android in 4_ Home should be filled in according to its own SDK path, and the rest can be copied directly. As for the SDK path, you can open Android studio and search the SDK in preference (Windows setting) to view it
Enter source. Bash in the terminal_ Profile [make our changes effective]
Enter ADB [verify whether the configuration is completed. If the ADB: command not found is not displayed, the configuration is completed]
Similar Posts:
- Mac ADB prompts command not found
- After installing node on MAC, enter node – V to prompt node command not found
- Super detail: command not found: the scratch solution (add the scratch environment variable to Zsh under MAC)
- macos -bash: yarn: command not found/-bash: cnpm: command not found
- HDFS Operate hadoop Error: Command not Found [How to Solve]
- How to install “CONDA command not found” in MAC Anaconda
- [Solved] Mac install maven Error: zsh: command not found: MVN
- [Solved] JPype Error: FileNotFoundError: [Errno 2] No such file or directory: ‘/usr/lib/jvm’
- [Solved] JSCH cannot run JAVA bash:java:Command not found.
- CentOS Error -bash:systemctl:command not found