In Mac systems, there are times when you use ADB for the first time in the Android SDK. cannot be used. Will prompt-bash:abd:command not found.
This behavior is caused by the fact that the environment variables for Android are not configured. Therefore, you need to configure environment variables for the Android SDK in your Mac.
Start the Mac comes with terminal terminal.
Enter the home directory of the current user.
Enter Echo $HOME on the command line
Create a. bash_profile file.
command line input touch. Bash_profile
Open a. bash_profile file.
command line input open-e. bash_profile After this command line is entered, the. bash_profile file's edit window is automatically ejected
Enter export path=/users/Your user name/file path in the. bash_profile file/platform-tools/: $PATH
Note: If you need to add more than one path to the path, you need to separate the words ":" (a colon in English). Because Android and adb these commands are in different folders, the format is:Path=${path}: Path 1: Path 2, in addition, if you specify more than one path, the end is not written: $PATH. For example:
Export path=${path}:/users/shanechen/documents/android-sdk-macosx/platform-tools:/users/shanechen/documents/ Android-sdk-macosx/tools
Save the file.
Simply close the. bash_profile file to automatically save what you have entered.
Update the environment variables you just configured
On the command line, enter source. bash_profile
Verify that the configuration is successful
Enter ADB if-bash:adb:command not found is present, and the ADB command parameter is interpreted. Indicates that the environment variable is configured successfully.
Wen/if_i_were_a_boy (author of Jane's book)
Original link: http://www.jianshu.com/p/1d8e00e83365
Copyright belongs to the author, please contact the author to obtain authorization, and Mark "book author".
Resolving Adb:command not found in Mac