我的游戏特别是三星设备面临此次崩溃,我知道如何处理此类问题。我已在项目中导入app compatibility v7
。
Build fingerprint: 'samsung/grandppltedtvvj/grandppltedtv:6.0.1/MMB29T/G532MTVJU1AQB1:user/release-keys'
Revision: '5'
ABI: 'arm'
pid: 22325, tid: 22341, name: GLThread 42320 >>> com.abc.candy <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x4
r0 00000000 r1 00000000 r2 00000000 r3 00000000
r4 00000001 r5 00000001 r6 00000001 r7 00000001
r8 00000001 r9 b31a1f00 sl 00000000 fp b2f402bc
ip b2f3fec4 sp b2f402a8 lr 9edd50d4 pc 9ee82900 cpsr 200f0010
backtrace:
#00 pc 0062e900 /data/app/com.abc.candy-1/lib/arm/libcocos2dcpp.so (_ZN7cocos2d3Ref6retainEv+20)
#01 pc 005810d0 /data/app/com.abc.candy2-1/lib/arm/libcocos2dcpp.so (_ZN7cocos2d6Sprite14setSpriteFrameEPNS_11SpriteFrameE+92)
#02 pc 00580fc4 /data/app/com.abc.candy-1/lib/arm/libcocos2dcpp.so (_ZN7cocos2d6Sprite14setSpriteFrameERKSs+616)
#03 pc 0041c23c /data/app/com.abc.candy-1/lib/arm/libcocos2dcpp.so (_ZN9GameScene15generateSpecialEP5CandySsii+844)
#04 pc 00425e18 /data/app/com.abc.candy-1/lib/arm/libcocos2dcpp.so
#05 pc 00432cfc /data/app/com.abc.candy-1/lib/arm/libcocos2dcpp.so
#06 pc 004dba4c /data/app/com.abc.candy-1/lib/arm/libcocos2dcpp.so (_ZNKSt8functionIFvvEEclEv+60)
#07 pc 004dabec /data/app/com.abc.candy-1/lib/arm/libcocos2dcpp.so (_ZN7cocos2d8CallFunc7executeEv+204)
#08 pc 004dab14 /data/app/com.abc.candy-1/lib/arm/libcocos2dcpp.so (_ZN7cocos2d8CallFunc6updateEf+40)
#09 pc 004df2bc /data/app/com.abc.candy-1/lib/arm/libcocos2dcpp.so (_ZN7cocos2d8Sequence6updateEf+1140)
#10 pc 004de3a8 /data/app/com.abc.candy-1/lib/arm/libcocos2dcpp.so (_ZN7cocos2d14ActionInterval4stepEf+584)
#11 pc 0073c4f4 /data/app/com.abc.candy-1/lib/arm/libcocos2dcpp.so (_ZN7cocos2d13ActionManager6updateEf+244)
#12 pc 00603000 /data/app/com.abc.candy-1/lib/arm/libcocos2dcpp.so (_ZZN7cocos2d9Scheduler14scheduleUpdateINS_13ActionManagerEEEvPT_ibENKUlfE_clEf+36)
#13 pc 00604b9c /data/app/com.abc.candy-1/lib/arm/libcocos2dcpp.so (_ZNSt17_Function_handlerIFvfEZN7cocos2d9Scheduler14scheduleUpdateINS1_13ActionManagerEEEvPT_ibEUlfE_E9_M_invokeERKSt9_Any_dataf+60)
#14 pc 004ea360 /data/app/com.abc.candy-1/lib/arm/libcocos2dcpp.so (_ZNKSt8functionIFvfEEclEf+88)
#15 pc 0063aeac /data/app/com.abc.candy-1/lib/arm/libcocos2dcpp.so (_ZN7cocos2d9Scheduler6updateEf+172)
#16 pc 005fe90c /data/app/com.abc.candy-1/lib/arm/libcocos2dcpp.so (_ZN7cocos2d8Director9drawSceneEv+160)
#17 pc 00602d74 /data/app/com.abc.candy-1/lib/arm/libcocos2dcpp.so (_ZN7cocos2d19DisplayLinkDirector8mainLoopEv+136)
#18 pc 004638a0 /data/app/com.abc.candy-1/lib/arm/libcocos2dcpp.so (Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeRender+40)
#19 pc 006da6a5 /data/app/com.abc.candy-1/oat/arm/base.odex (offset 0x512000)
Build fingerprint: 'samsung/j23gdd/j23g:5.1.1/LMY48B/J200HXXU0APK1:user/release-keys'
Revision: '2'
ABI: 'arm'
pid: 22292, tid: 22310, name: GLThread 3374 >>> com.abc.candy <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x20
r0 9f21dc00 r1 00000078 r2 00000078 r3 00000000
r4 a3396b5c r5 a2dcbd5c r6 9f21dc00 r7 9f280184
r8 010f03ce r9 b4428400 sl 00000000 fp a264e854
ip 9f21dc00 sp a264e800 lr a2c68d48 pc a2c68b4c cpsr 800f0010
所有这些崩溃都发生在三星设备中而不是其他设备中。
答案 0 :(得分:0)
您可以使用以下方法检查发生崩溃的确切行号: - 当你在LogCat上遇到这样的错误时,它们会保存在$ PROJECT_PATH / obj / local / armeabi中,其中$ PROJECT_PATH是你的cocos2d-x android项目的路径。要将消息符号化为可理解的内容,可以使用ndk-stack工具。
打开终端(或Cygwin,但不确定)并输入
cd $ ANDROID_NDK adb logcat | ./ndk-stack -sym $ PROJECT_PATH / obj / local / armeabi 其中:
$ ANDROID_NDK是Android NDK的路径
$ PROJECT_PATH是你的cocos2d-x android项目的路径