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:
- Open Terminal Terminal
- Enter the user directory: cd ~ /
- touch .bash_profile
- open .bash_profile at this time if the file has not been created will automatically be created and then automatically opened
- 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.