Cocos2d-x 3.2编译生成Android程序出错的解决方法

2014-10-5 杜世伟 cocos2d-x

    用Cocos2d-x 3.2正式版创建项目,结果使用cocos compile -p android编译生成APK程序,结果悲剧了,出现以下错误。

Android NDK: Invalid APP_STL value: c++_static   


Android NDK: Please use one of the following instead:  system stlport_static stlport_static_hard stlport_shared stlport_shared_hard gnustl_static gnustl_shared gabi++_static gabi++_shared libc++_static libc++_shared none   

make: Entering directory `/game/physics_engine/proj.android'

/sdk/ndk/android-ndk-r9c/build/core/add-application.mk:274: *** Android NDK: Aborting    .  Stop.

make: Leaving directory `/game/physics_engine/proj.android'

Error running command, return code: 2

   解决方案:

   造成问题的原因是android-ndk版本太低了(我的版本是android-ndk-r8e),升级android-ndk版本,我升级到android-ndk-r9这个版本虽然比较之前的版本新,但是它不能满足要求,最后我下载使用android-ndk-r9d版本,在此附上下载链接http://big1.cr173.com/android-ndk-r9d-windows-x86_64.zip,放到之前指定的目录,修改下环境变量即可


 

标签: cocos2d-x android ndk

Powered by emlog 沪ICP备2023034538号-1