我们在应用中使用了react native 0.59.1,它在启动时在装有Android 7的Samsung Galaxy S7上崩溃。任何其他经过测试的设备(包括其他三星设备和其他装有Android 7的设备)也可以与具有Android 6或8的Samsung S7一起正常运行。崩溃仅出现在具有Android 7的S7上。
已经尝试将RN降级至0.58,并解决了以下问题:https://github.com/facebook/react-native/issues/24260,https://github.com/facebook/react-native/issues/24261-没有帮助。
有人可以向我解释这种行为的原因并帮助解决此崩溃的问题吗?
这是logcat的堆栈跟踪:
ASSERT|04-17 00:30:16.272|18763|18813||libc|Fatal signal 11 (SIGSEGV), code 1, fault addr 0xbbadbeef in tid 18813 (mqt_js)
ASSERT|04-17 00:30:16.402|18920|18920||DEBUG|Build fingerprint: 'samsung/heroltexx/herolte:7.0/NRD90M/G930FXXS1DQHF:user/release-keys'
ASSERT|04-17 00:30:16.402|18920|18920||DEBUG|*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
ASSERT|04-17 00:30:16.405|18920|18920||DEBUG|ABI: 'arm64'
ASSERT|04-17 00:30:16.405|18920|18920||DEBUG|Revision: '8'
ASSERT|04-17 00:30:16.406|18920|18920||DEBUG|pid: 18763, tid: 18813, name: mqt_js >>> com.profibackoffice.reactnative <<<
ASSERT|04-17 00:30:16.406|18920|18920||DEBUG|signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xbbadbeef
ASSERT|04-17 00:30:16.407|18920|18920||DEBUG| x16 00000070110b1acc x17 000000700bc121a8 x18 0000000021ecfc88 x19 000000700fed7e80
ASSERT|04-17 00:30:16.407|18920|18920||DEBUG| x20 00000070108cf560 x21 0000006ffd4c8070 x22 000000700bc00000 x23 0000006ff9616ca0
ASSERT|04-17 00:30:16.407|18920|18920||DEBUG| x28 ffff000000000002 x29 00000070108cf560 x30 0000007011408484
ASSERT|04-17 00:30:16.407|18920|18920||DEBUG| x24 0000000000000007 x25 0000000000000000 x26 0000000000000000 x27 ffff000000000000
ASSERT|04-17 00:30:16.407|18920|18920||DEBUG| x8 00000000bbadbeef x9 00000070114b19d0 x10 0000000000000000 x11 0000006ffc4f0000
ASSERT|04-17 00:30:16.407|18920|18920||DEBUG| x0 00000070108cf3c8 x1 00000070108cf3c8 x2 0000000000000000 x3 00000000000000a8
ASSERT|04-17 00:30:16.407|18920|18920||DEBUG| sp 00000070108cf400 pc 000000701140848c pstate 00000000a0000000
ASSERT|04-17 00:30:16.407|18920|18920||DEBUG| x4 000000700bfaee80 x5 0000006ff62a4980 x6 0000006ffa6a6820 x7 0000000000000000
ASSERT|04-17 00:30:16.407|18920|18920||DEBUG| x12 0000000000000000 x13 000000700b617c00 x14 0000000000000002 x15 00000000bd36143d
ASSERT|04-17 00:30:16.412|18920|18920||DEBUG|backtrace:
ASSERT|04-17 00:30:16.412|18920|18920||DEBUG| #03 pc 00000000001afe80 <anonymous:000000700bdff000>
ASSERT|04-17 00:30:16.412|18920|18920||DEBUG| #02 pc 0000000000489f2c /data/app/com.profibackoffice.reactnative-1/lib/arm64/libjsc.so (operationLinkDirectCall+1120)
ASSERT|04-17 00:30:16.412|18920|18920||DEBUG| #01 pc 00000000000be650 /data/app/com.profibackoffice.reactnative-1/lib/arm64/libjsc.so (_Z16WTFCrashWithInfoiPKcS0_i+24)
ASSERT|04-17 00:30:16.412|18920|18920||DEBUG| #00 pc 00000000007e048c /data/app/com.profibackoffice.reactnative-1/lib/arm64/libjsc.so (WTFCrash+16)
答案 0 :(得分:0)
https://github.com/facebook/react-native/issues/24261中的解决方法起作用。当我尝试这样做时,我只是从另一个地方删除了"arm64-v8a", "x86_64"
并忘记了ndk块(我之前已经删除了整个块)。因此,在将这些行添加到build.gradle之后,文件崩溃消失了。
ndk {
abiFilters "armeabi-v7a", "x86"
}