The situation
- Create Cocos2d-x project as below.
cocos new TestingProject -p com.TestingProject -l cpp
- Change the parameter of proj.android/jni/Application.mk
APP_ABI := x86
- Execute the project.
cocos run -p android
- Crash!
Fatal signal 11 (SIGSEGV) at 0x00000000 (code=128)
Environment
Cocos2d-x 3.10Android SDK API level 15
Android NDK r9d
Apache ANT 1.9.7
The reason
It is just bad pair to Android SDK API level 15 and x86 device.The solution
- Add command option except SDK 15 if the project is compiled.
cocos run -p android -ap android-20
- Add parameter into (ProjectName)/proj.android/jni/Application.mk
APP_CPPFLAGS += -U__SSE__
Ref link
https://github.com/sqlcipher/android-database-sqlcipher/issues/200https://github.com/cocos2d/cocos2d-x/issues/8964