cocos2d 3.2 生成Android專案檔案問題 Invalid APP_STL value: c++_static
阿新 • • 發佈:2019-01-05
終於找到了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
問題2 在cocos compile -p android -j 4的時候,出現問題