Mac Add or modify environment variables

Source: Internet
Author: User

Mode 1. Terminal Add or modify

Command: Pico, VIM, etc.

Way:Pico. Bash_profile

Mode 2. Text mode Add or modify

1) Open

    Touch ~/.bash_profile

    Open-t ~/.bash_profile

2) Add or modify

Such as:

Export ANDROID_SDK_ROOT=***/ADT-BUNDLE-MAC-X86_64-20140702/SDK

Export ANDROID_NDK_ROOT=***/ANDROID-NDK-R10C
Export NDK_ROOT=***/ANDROID-NDK-R10C
Export cocos2dx_root=***/cocos2d-x-2.2.3
Export path= $PATH: $ANDROID _sdk_root
Export path= $PATH: $ANDROID _ndk_root

Where: * * * is your root directory, such as:/users/yourname/projects

3) Effective immediately

    SOURCE ~/.bash_profile

4) Check that the configuration is correct

Restart Terminal

Input: Echo $your path

Enter

Mac Add or modify environment variables

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.