用华为荣耀手机GEM机型使用热修复补丁出现读取补丁就崩溃的问题,其系统日志打印如下
I/dex2oat: dex2oat took 104.305ms (threads: 4) arena alloc=564KB java alloc=384KB native alloc=1558KB free=37KB
A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x8000912d20010 in tid 11910 (om.zwashservice)
I/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG: Build fingerprint: 'HUAWEI/GEM-703L/HWGemini:5.1.1/HUAWEIGEM-703L/C233B112:user/release-keys'
I/DEBUG: Revision: '0'
I/DEBUG: ABI: 'arm64'
I/DEBUG: pid: 11910, tid: 11910, name: om.zwashservice >>> com.community.custom.zwashservice <<<
I/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8000912d20010
I/DEBUG: x0 0000000912cca000 x1 0008000912d20000 x2 0000000000000001 x3 000000557492616c
I/DEBUG: x4 0000000000000000 x5 0000005574926168 x6 0000000000000000 x7 0000000000430000
I/DEBUG: x8 0000000000000000 x9 6dea0bed7f7d6fbf x10 0000000000000000 x11 0000000000430000
I/DEBUG: x12 0000000000550000 x13 0000000000430000 x14 0000000000000000 x15 0000007faf05e000
I/DEBUG: x16 0000007faf060470 x17 000000000000002e x18 0000007faefbb000 x19 000000000000003a
I/DEBUG: x20 0000007f9a7cd29c x21 0000005574936db0 x22 0000000012c643f0 x23 0000000012e38280
I/DEBUG: x24 0000000012e382e0 x25 0000000012c64ad0 x26 0000000012e30ac0 x27 0000000012c643f0
I/DEBUG: x28 0000000012c1e400 x29 0000000012e2adc0 x30 0000007f9a7cd8a0
I/DEBUG: sp 0000007fee906c80 pc 0000007f9a7cd8b4 pstate 0000000060000000
I/DEBUG: backtrace:
I/DEBUG: #00 pc 00000000000018b4 /data/app/com.community.custom.zwashservice-1/lib/arm64/libandfix.so (replace_5_1(_JNIEnv*, _jobject*, _jobject*)+68)
I/DEBUG: #01 pc 0000000000001554 /data/app/com.community.custom.zwashservice-1/lib/arm64/libandfix.so
I/DEBUG: #02 pc 00000000000012d4 /data/app/com.community.custom.zwashservice-1/lib/arm64/libandfix.so
I/DEBUG: #03 pc 00000000004b818c /data/dalvik-cache/arm64/data@app@com.community.custom.zwashservice-1@base.apk@classes.dex
I/K3V3CpuGovernorPolicy: close previously scene Hmp policy : 300 , 150
I/DEBUG: Tombstone written to: /data/tombstones/tombstone_05
用官网 andfix so库没有解决问题最后修改了gradle配置文件解决问题。
参考博客:http://www.cnblogs.com/poe-blog/p/4728970.html
Edit your build.gradle file
as follows:
android {
// rest of your app's logic
splits {
abi {
enable true
reset()
include 'x86',
'x86_64', 'arm64-v8a',
'armeabi-v7a',
'armeabi'
universalApk false
}
}
}
(*)注意上面的红色部分要删除掉最后看起来是这样:
android {
// rest of your app's logic
splits {
abi {
enable true
reset()
include 'x86',
'x86_64',
'armeabi-v7a',
'armeabi'
universalApk false
}
}
}
原理:
enable: enables the ABIs split mechanism
exclude: By default all ABIs are included, you can remove some ABIs.
include: indicate which ABIs to be included
reset(): reset the list of ABIs to be included to an empty string (this allows, in conjunctions with
include, to indicate which one to use rather than which ones to ignore)
universalApk: indicates whether to package a universal version (with all ABIs) or not. Default is false.
转载请注明原文地址: https://ju.6miu.com/read-1303279.html