本文转自:http://blog.sina.com.cn/s/blog_986c47a70102uy91.html
问题:Android NDK: Invalid APP_STL value:c++_static
解决办法(2个):
1.升级android-ndk-r9b为最新的android-ndk-r9d (下载地址:https://developer.android.com/tools/sdk/ndk/index.html),此乃上上策!
2.修改jni/Application.mk:
把前4行:
APP_STL := c++_static
NDK_TOOLCHAIN_VERSION=clang
APP_CPPFLAGS := -frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -std=c++11 -fsigned-char
APP_LDFLAGS := -latomic
改成:
APP_STL := gnustl_static
# add -Wno-literal-suffix to avoid warning: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]
# in NDK_ROOT/arch-arm/usr/include/sys/cdefs_elf.h:35:28: when using ndk-r9
APP_CPPFLAGS := -frtti -DCOCOS2D_DEBUG=1 -std=c++11 -Wno-literal-suffix -fsigned-char