通常开发需要配置一些环境变量,下面把我电脑的部分配置分析一下。

1.android开发配置,ndk,sdk,ant

2.cocos2dx开发配置,cocos2d-x

export COCOS2DX_ROOT=/Users/huazai/Documents/cocos2d-x-2.2.1

export NDK_ROOT=/Users/huazai/Documents/android/android-ndk-r9b

export ANDROID_NDK_ROOT=/Users/huazai/Documents/android/android-ndk-r9b

export ANDROID_SDK_ROOT=/Users/huazai/Documents/android/sdk

export ANDROID_SDK_ROOT_PLATFORM_TOOLS=/Users/huazai/Documents/android/sdk/platform-tools

export ANDROID_SDK_ROOT_TOOLS=/Users/huazai/Documents/android/sdK/tools

export PATH=$ANDROID_NDK_ROOT:$PATH

export PATH=$ANDROID_SDK_ROOT:$PATH

export PATH=${PATH}:/Users/huazai/Documents/android/sdk/platform-tools:/Users/huazai/Documents/android/sdk/tools

export ANT_HOME=/Users/huazai/Documents/android/apache-ant-1.9.2

export PATH=${PATH}:${ANT_HOME}/bin

步骤如下:

1.vim ~/.bash_profile

2.write your path and close the vim

3.source ~/.bash_profile

05-11 20:14