Resolving Adb:command not found in Mac

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.