NDK not found

NDK not found
0.0 0



Im using cocos2d-x v3.0-beta2 right now and trying to compile my application for the android platform.
I went to proj.android and edited the build_native.py file to add the NDK & SDK root pathes

I did add the following lines:
SDK_ROOT = "/Users/Larcyn/Documents/Development/Apps/sdk"
NDK_ROOT = “/Users/Larcyn/Documents/Development/Apps/ndk”

But I still can’t build the project. What am I doing wrong?
The error I am getting is that NDK root isn’t defined.
“NDK_ROOT not defined. Please define NDK_ROOT in your environment”

Kind regards,


What OS are you using?


I am using OS X Mavericks v10.9.1


Open a Terminal window and type:

export NDK_ROOT = “/Users/Larcyn/Documents/Development/Apps/ndk”

Then try building it :slight_smile:


Thank you StainzE works well, but I just found this better solution so I dont have to type that everytime I’m going to compile.

Enter the following under “import os” in the build_native.py file
os.environ[“ANDROID_SDK_ROOT”] = "/Users/Larcyn/Documents/Development/Apps/sdk"
os.environ[“NDK_ROOT”] = "/Users/Larcyn/Documents/Development/Apps/ndk"
under the “import os”

I could also use your solution by adding that line into the bash file :wink: