Open bright999 opened 6 years ago
此问题,我已经解决,最后发现是文档误导了我,哎,幸好我自己看源码一步步了解,才发现原因不是那样子的,后面的兄弟,你们一定要小心接入,如果出现问题自己解决不了,还是建议不接入这个热更新,如果有能力解决出现的问题,才考虑接入。总结:如果遇到问题,网上找原因和答案,如果找不到原因,看源码,了解了原理就很容易解决问题
具体是什么原因呢,我用demo的可以,但是移植到自己工程总是报你一样的错误
我接入之后,第二次补丁包完全无效,楼主的第二次补丁包是怎么弄的啊? @bright999
热更新两次以上,安卓基础包就运行不起来 安装基础包后运行没有问题,修改代码后再打补丁包,可以在基础包上成功修改,再次修改代码后打补丁包,热更新好,启动基础包后安卓软件异常退出,提示"很抱歉,"XXX"已停止运行"
异常类型
app运行时异常
手机型号
ZUK Z2 Pro 或者Moto X
手机系统版本
android 7.0 或者android 5.1
Tinker版本
tinker:1.9.6, tinkerpatch:1.2.6, tinker-support:1.1.2, crashreport_upgrade:1.3.5, tinker-android-lib:1.9.6
gradle版本
2.10
系统
window 7
堆栈/日志
06-20 19:20:21.412 22165-22165/com.test.deme I/progress: WelcomeActivity onCreate 06-20 19:20:21.586 22165-22165/com.test.deme I/System.out: 1529493621586 06-20 19:20:21.651 22165-22165/com.test.deme E/libEGL: call to OpenGL ES API with no current context (logged once per thread)
06-20 19:20:21.653 22165-22165/com.test.deme A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0xf31fe110 in tid 22165 (.android.member) 06-20 19:20:21.757 355-355/? I/DEBUG: 06-20 19:20:21.757 355-355/? I/DEBUG: Build fingerprint: 'motorola/victara_retcn/victara:5.1/LPES23.32-70-5/5:user/release-keys' 06-20 19:20:21.757 355-355/? I/DEBUG: Revision: 'p1b0' 06-20 19:20:21.757 355-355/? I/DEBUG: ABI: 'arm' 06-20 19:20:21.758 355-355/? I/DEBUG: pid: 22165, tid: 22165, name: .android.member >>> com.test.deme <<< 06-20 19:20:21.759 355-355/? I/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xf31fe110 06-20 19:20:21.777 355-355/? I/DEBUG: r0 2ad5e00c r1 2ae5dfe0 r2 00000001 r3 00000000 06-20 19:20:21.777 355-355/? I/DEBUG: r4 0000001b r5 74aa2390 r6 2ae4cf10 r7 2ae66ca0 06-20 19:20:21.777 355-355/? I/DEBUG: r8 2ae5dd00 r9 b8f25970 sl 2b0cd750 fp 2b0e1d20 06-20 19:20:21.777 355-355/? I/DEBUG: ip 72128041 sp beba3a70 lr a57f0eed pc b4eee578 cpsr 600d0030 06-20 19:20:21.777 355-355/? I/DEBUG: backtrace: 06-20 19:20:21.778 355-355/? I/DEBUG: #00 pc 000a4578 /system/lib/libart.so (art_quick_imt_conflict_trampoline+7) 06-20 19:20:21.778 355-355/? I/DEBUG: #01 pc 0073deeb /data/dalvik-cache/arm/data@app@com.test.deme-1@base.apk@classes.dex 06-20 19:20:21.935 1365-1365/? I/MotoNetwCtrlr: onReceive: Received intent=Intent { act=android.net.wifi.RSSI_CHANGED flg=0x4000010 (has extras) } Action=android.net.wifi.RSSI_CHANGED 06-20 19:20:21.935 1365-1365/? I/MotoNetwCtrlr.MotoWifiSignalCtrlr: handleBroadcast: Entered: Intent=Intent { act=android.net.wifi.RSSI_CHANGED flg=0x4000010 (has extras) } Action=android.net.wifi.RSSI_CHANGED 06-20 19:20:21.935 1365-1365/? I/MotoNetwCtrlr.MotorolaWifiSignalController: isDirty: returns false 06-20 19:20:21.935 1365-1365/? I/MotoNetwCtrlr.MotoWifiSignalCtrlr: handleBroadcast: Completed 06-20 19:20:21.935 1365-1365/? I/MotoNetwCtrlr: onReceive: Completed intent=Intent { act=android.net.wifi.RSSI_CHANGED flg=0x4000010 (has extras) } Action=android.net.wifi.RSSI_CHANGED 06-20 19:20:22.405 355-355/? W/debuggerd: type=1400 audit(0.0:2419): avc: denied { search } for uid=0 name="com.test.deme" dev="mmcblk0p39" ino=127806 scontext=u:r:debuggerd:s0 tcontext=u:object_r:app_data_file:s0 tclass=dir permissive=0 06-20 19:20:22.421 355-355/? I/DEBUG: Tombstone written to: /data/tombstones/tombstone_02 06-20 19:20:22.422 998-1045/? I/BootReceiver: Copying /data/tombstones/tombstone_02 to DropBox (SYSTEM_TOMBSTONE) 06-20 19:20:22.423 998-22694/? W/ActivityManager: Force finishing activity 1 com.test.deme/.activities.WelcomeActivity 06-20 19:20:22.440 998-1013/? W/InputMethodManagerService: Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@2cf57da9 attribute=null, token = android.os.BinderProxy@b58d5bf 06-20 19:20:22.459 998-1307/? D/WifiService: Client connection lost with reason: 4 06-20 19:20:22.483 998-1909/? I/OpenGLRenderer: Initialized EGL, version 1.4 06-20 19:20:22.529 380-380/? I/Zygote: Process 22165 exited due to signal (11) 06-20 19:20:22.553 998-1012/? I/art: Background partial concurrent mark sweep GC freed 161989(7MB) AllocSpace objects, 14(3MB) LOS objects, 30% free, 37MB/53MB, paused 1.677ms total 123.604ms 06-20 19:20:22.574 998-1387/? I/ActivityManager: Process com.test.deme (pid 22165) has died 06-20 19:20:22.574 998-1387/? W/ActivityManager: Scheduling restart of crashed service com.test.deme/com.igexin.sdk.PushServiceUser in 1000ms 06-20 19:20:22.616 998-1710/? I/ActivityManager: Start proc 22700:com.test.deme/u0a415 for service com.test.deme/com.igexin.sdk.PushServiceUser 06-20 19:20:22.625 22700-22700/? I/art: Late-enabling -Xcheck:jni 06-20 19:20:22.641 22700-22700/? E/Parcel: Reading a NULL string not supp
测试包控制台有时会输出这个: 06-21 11:13:39.042 31254-31270/com.mama100.android.member E/StrictMode: A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks. java.lang.Throwable: Explicit termination method 'end' not called at dalvik.system.CloseGuard.open(CloseGuard.java:184) at java.util.zip.Inflater.(Inflater.java:82)
at java.util.zip.ZipFile.getInputStream(ZipFile.java:331)
at java.util.jar.JarFile.getInputStream(JarFile.java:390)
at com.tencent.bugly.beta.tinker.TinkerUtils.readJarEntry(BUGLY:343)
at com.tencent.bugly.beta.tinker.TinkerUtils.readJarEntry(BUGLY:323)
at com.tencent.bugly.beta.tinker.TinkerUtils.readJarEntry(BUGLY:303)
at com.tencent.bugly.beta.tinker.TinkerManager.checkNewPatch(BUGLY:477)
at com.tencent.bugly.beta.tinker.TinkerManager.applyPatch(BUGLY:431)
at com.tencent.bugly.beta.tinker.TinkerManager.onDownloadSuccess(BUGLY:409)
at com.tencent.bugly.beta.download.a.onCompleted(BUGLY:203)
at com.tencent.bugly.beta.global.d.run(BUGLY:263)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5343)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102)
06-21 11:13:39.044 31254-31270/com.mama100.android.member E/StrictMode: A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
java.lang.Throwable: Explicit termination method 'close' not called
at dalvik.system.CloseGuard.open(CloseGuard.java:184)
at java.io.RandomAccessFile.(RandomAccessFile.java:127)
at java.io.RandomAccessFile.(RandomAccessFile.java:149)
at java.util.zip.ZipFile.(ZipFile.java:158)
at java.util.jar.JarFile.(JarFile.java:199)
at java.util.jar.JarFile.(JarFile.java:182)
at java.util.jar.JarFile.(JarFile.java:168)
at com.tencent.bugly.beta.tinker.TinkerUtils.readJarEntry(BUGLY:302)
at com.tencent.bugly.beta.tinker.TinkerManager.checkNewPatch(BUGLY:477)
at com.tencent.bugly.beta.tinker.TinkerManager.applyPatch(BUGLY:431)
at com.tencent.bugly.beta.tinker.TinkerManager.onDownloadSuccess(BUGLY:409)
at com.tencent.bugly.beta.download.a.onCompleted(BUGLY:203)
at com.tencent.bugly.beta.global.d.run(BUGLY:263)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5343)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102)
06-21 11:13:39.045 31254-31270/com.mama100.android.member E/StrictMode: A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
java.lang.Throwable: Explicit termination method 'close' not called
at dalvik.system.CloseGuard.open(CloseGuard.java:184)
at java.util.zip.ZipFile.(ZipFile.java:173)
at java.util.jar.JarFile.(JarFile.java:199)
at java.util.jar.JarFile.(JarFile.java:182)
at java.util.jar.JarFile.(JarFile.java:168)
at com.tencent.bugly.beta.tinker.TinkerUtils.readJarEntry(BUGLY:302)
at com.tencent.bugly.beta.tinker.TinkerManager.checkNewPatch(BUGLY:477)
at com.tencent.bugly.beta.tinker.TinkerManager.applyPatch(BUGLY:431)
at com.tencent.bugly.beta.tinker.TinkerManager.onDownloadSuccess(BUGLY:409)
at com.tencent.bugly.beta.download.a.onCompleted(BUGLY:203)
at com.tencent.bugly.beta.global.d.run(BUGLY:263)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5343)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102)
在网上找了找资料,应该关系不太大
复现路径
我严格按照文档把bugly接入到我们项目,正常打基础包,安装到某台手机上,修改某一块代码,正常打补丁包,上传到bugly服务器,重启接入了bugly sdk的安卓软件,不行的话再重启,一般就可以修复某问题了,然后再修改某一块代码,打次打补丁包,并上传bugly服务器,再重启接入了bugly sdk的安卓软件,这时就出问题了,然后安卓软件提示无法启动软件(提示"很抱歉,"XXX"已停止运行"),此问题现在是必现问题,有一个情况我得说明,之前使用了一个bugly测试appid,使用的tinkerid也是与现在使用的正式bugly appid使用基础包的tinkerid是一样的,不知道是否有影响或者干扰,望大家指点下问题出在哪里,如果还有需要协助提供的具体情况和资料,可以随时提出来,429975901 QQ群已经满人,还有别的反馈渠道么