Search code examples
cocos2d-xcocos2d-x-3.0

Build dynamic library for project fails! - android cocos


Im new to cocos2d and trying to build the android project for first time in mac OS maverics. I have downloaded the new version of cocos2dx3.2 android SDK NDK v9 and the ANT. When im going to build the project is shows a error like

Build dynamic library for project [ /Users/Lahiru/Desktop/Cocos/cocos2dx/build/../tests/cpp-tests/proj.android ] fails!

my .bashprofile is like this

# Add environment variable COCOS_CONSOLE_ROOT for cocos2d-x
export COCOS_CONSOLE_ROOT=/Users/Lahiru/Desktop/Cocos/cocos2dx/tools/cocos2d-console/bin
export PATH=$COCOS_CONSOLE_ROOT:$PATH

# Add environment variable NDK_ROOT for cocos2d-x
export NDK_ROOT=/Users/Lahiru/Desktop/Cocos/androidndkr9
export PATH=$NDK_ROOT:$PATH

# Add environment variable ANDROID_SDK_ROOT for cocos2d-x
export ANDROID_SDK_ROOT=/Users/Lahiru/Desktop/Cocos/adtbundle/sdk
export PATH=$ANDROID_SDK_ROOT:$PATH
export PATH=$ANDROID_SDK_ROOT/tools:$ANDROID_SDK_ROOT/platform-tools:$PATH

# Add environment variable ANT_ROOT for cocos2d-x
export ANT_ROOT=/Users/Lahiru/Desktop/Cocos/apacheant194/bin
export PATH=$ANT_ROOT:$PATH

# Setting PATH for Python 2.7
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
export PATH

Can anyone guide me what did I missed? Thanks


Solution

  • try switch from ndk9b to ndk9d. the recent version of cocos2dx made a switch from ndk9b to ndk9d.