mac system input appears adb adb: command not found how should solve - Best Practices

When we installed a new Android Studio in mac system, the input terminal in adb often occur adb: prompt command not found, the emergence of this tip is due to the Android environment variable in our mac system has not been configured as a result. Solution is as follows:

  1. Open Terminal Terminal
  2. Enter the user directory: cd ~ /
  3. touch .bash_profile
  4. open .bash_profile at this time if the file has not been created will automatically be created and then automatically opened
  5. Enter the following command to open the file:

export ANDROID_HOME=。。。,hereexport ANDROID_HOME=你的安卓sdk路径,可以在android stuio中通过sdk manager来找到

export PATH=${PATH}:${ANDROID_HOME}/tools

export PATH=${PATH}:${ANDROID_HOME}/platform-tools

然后保存

6.在terminal窗口中输入 source .bash_profile

At this point enter the adb in temianl If prompted, set the environment variable to prove successful.

Published 41 original articles · won praise 8 · views 20000 +

Guess you like

Origin blog.csdn.net/huma8848888/article/details/95060493