Recently upgraded to Cocos2d-x 3.2 official version, the iOS program compiled without any problems, the results using Cocos compile-p Android compiled APK program, the result is tragic, the following error occurred.
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_sh Ared_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
Obviously, this error is using an incorrect STL Library, the solution has the following two.
Scenario 1: Interim programme
Modify the Application.mk file to replace the original first 4 lines with the following content. And then the replacement is OK.
The original content is as follows:
App_stl: = c++_static
Ndk_toolchain_version=clang
App_cppflags: =-frtti-dcc_enable_chipmunk_integration=1-std=c++11-fsigned-char
App_ldflags: =-latomic
The following contents are replaced:
App_stl: = gnustl_static
App_cppflags: =-frtti-dcocos2d_debug=1-std=c++11-wno-literal-suffix-fsigned-char
Scenario 2:
Since c++_static can only be used in the latest NDK, downloading the latest ndk is possible.
You can download the latest NDK version from http://developer.android.com/tools/sdk/ndk/index.html and then reset the NDK path.