我尝试编译Cococs2d-x android项目......
$ cd /Users/ahmadayman/Documents/games/game01/proj.android
$ python ./build_native.py
我收到以下错误!
The Selected NDK toolchain version was 4.8 !
Android NDK: Invalid APP_STL value: c++_static
Android NDK: Please use one of the following instead: system stlport_static stlport_shared gnustl_static gnustl_shared gabi++_static gabi++_shared none
make: Entering directory `/Users/ahmadayman/Documents/games/game01/proj.android'
/Users/ahmadayman/android-ndk-r9/build/core/add-application.mk:254: *** Android NDK: Aborting . Stop.
make: Leaving directory `/Users/ahmadayman/Documents/games/game01/proj.android'
Traceback (most recent call last):
File "./build_native.py", line 159, in <module>
build(opts.ndk_build_param,opts.android_platform,opts.build_mode)
File "./build_native.py", line 146, in build
do_build(cocos_root, ndk_root, app_android_root,ndk_build_param,sdk_root,android_platform,build_mode)
File "./build_native.py", line 82, in do_build
raise Exception("Build dynamic library for project [ " + app_android_root + " ] fails!")
Exception: Build dynamic library for project [
/Users/ahmadayman/Documents/games/game01/proj.android ] fails!
当我运行此命令时......
$ ndk-build
Android NDK: Invalid APP_STL value: c++_static
Android NDK: Please use one of the following instead: system stlport_static stlport_shared gnustl_static gnustl_shared gabi++_static gabi++_shared none
/Users/ahmadayman/android-ndk-r9/build/core/add-application.mk:254: *** Android NDK: Aborting . Stop.
答案 0 :(得分:2)
你需要一个较新的NDK版本,NDK r9没有提供libc ++ _ static,这就是为什么它不是你的Application.mk中的有效值