Skip to content Skip to sidebar Skip to footer

Define Ndk_root In Cocos2dx Mutiplatform Game Environment

I have just started working with cocos2dx android and I am following wonderful tutorial of http://www.raywenderlich.com/33750/cocos2d-x-tutorial-for-ios-and-android-getting-started

Solution 1:

To make those variables permanent (so every terminal shell you open hereafter has then) use your favorite text editor to update your bash profile (I chose vi to keep it in the terminal)

NOTE: the use of "~" in a path is just shorthand for your user directory. In your case it appears to be synonymous with saying "~" = "/Users/alex"

vi ~/.bash_profile

add the following lines and save (update these names and paths to matchyour actual environment, I am assuming everything is in the root of your user directory here):

export NDK_ROOT_LOCAL=~/android-ndk-r10b
export ANDROID_SDK_ROOT_LOCAL=~/sdk

Use source to run the profile in the current terminal session or just open a new terminal

source ~/.bash_profile

You can test to see if the variables are defined here (use whatever you named them)

echo$NDK_ROOT_LOCALecho$ANDROID_SDK_ROOT_LOCAL

[EDIT: noted that paths need to be tuned to your environment]

Solution 2:

this way i can define my NDK ROOT

export NDK_ROOT=/Users/alex/android-ndk-r8b

Solution 3:

If you are using MAC OSX please consider adding NDK_ROOT variable in Environments file. Linux directly read it when the instance of bash is initiated but in MAC you need to add it in a bit more detail. Try adding it.

Post a Comment for "Define Ndk_root In Cocos2dx Mutiplatform Game Environment"