Tencent / tinker

Tinker is a hot-fix solution library for Android, it supports dex, library and resources update without reinstall apk.
Other
17.17k stars 3.34k forks source link

加载patch包,出现pre-verified crash #636

Closed karlzhouzhi closed 7 years ago

karlzhouzhi commented 7 years ago

异常类型:app运行时异常

手机型号:sumsung N9008

手机系统版本:android4.4.2

tinker版本: 1.8.1

gradle版本::2.3.3

是否使用热更新SDK: TinkerPatch SDK

系统:如:windows

堆栈/日志: java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation 10-20 17:26:33.541 27601-27601/? W/System.err: at com.yixin.itoumi.c.a.d.(Unknown Source) 10-20 17:26:33.541 27601-27601/? W/System.err: at com.yixin.itoumi.c.a.d.a(Unknown Source) 10-20 17:26:33.541 27601-27601/? W/System.err: at com.yixin.itoumi.c.b.(Unknown Source) 10-20 17:26:33.541 27601-27601/? W/System.err: at com.yixin.itoumi.c.b.a(Unknown Source) 10-20 17:26:33.541 27601-27601/? W/System.err: at com.yixin.itoumi.ApplicationMy.onCreate(Unknown Source) 10-20 17:26:33.541 27601-27601/? W/System.err: at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1025) 10-20 17:26:33.541 27601-27601/? W/System.err: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4551) 10-20 17:26:33.541 27601-27601/? W/System.err: at android.app.ActivityThread.access$1500(ActivityThread.java:163) 10-20 17:26:33.541 27601-27601/? W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1317) 10-20 17:26:33.541 27601-27601/? W/System.err: at android.os.Handler.dispatchMessage(Handler.java:102) 10-20 17:26:33.541 27601-27601/? W/System.err: at android.os.Looper.loop(Looper.java:157) 10-20 17:26:33.541 27601-27601/? W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5335) 10-20 17:26:33.541 27601-27601/? W/System.err: at java.lang.reflect.Method.invokeNative(Native Method) 10-20 17:26:33.541 27601-27601/? W/System.err: at java.lang.reflect.Method.invoke(Method.java:515) 10-20 17:26:33.541 27601-27601/? W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265) 10-20 17:26:33.541 27601-27601/? W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081) 10-20 17:26:33.541 27601-27601/? W/System.err: at dalvik.system.NativeStart.main(Native Method) 10-20 17:26:33.541 27601-27601/? E/Debug Message - > >: 崩溃时间:2017-10-20 17:26:33 10-20 17:26:33.541 27601-27601/? E/Debug Message - > >: 崩溃简短信息:Class ref in pre-verified class resolved to unexpected implementation 10-20 17:26:33.541 27601-27601/? E/Debug Message - > >: 崩溃原因:null 10-20 17:26:33.541 27601-27601/? E/Debug Message - > >: 崩溃线程名称:main崩溃线程ID:1 10-20 17:26:33.551 27601-27615/? E/File: fail readDirectory() errno=13

karlzhouzhi commented 7 years ago

同样的步骤在华为RIO,andriod6.0上没有问题

karlzhouzhi commented 7 years ago

E/Tinker.SampleUncaughtExHandler: uncaughtException:Class ref in pre-verified class resolved to unexpected implementation

shwenzhang commented 7 years ago

pre-verified 一般都是接入的问题导致

  1. tinker loader 如何设置
  2. application是否做了自定义等
JohnsonZZZ commented 7 years ago

同样遇到该问题,1.7.11 更新到1.8.1之后部分机型(主要是4.x)出现这个BUG ,以上两种方法都试过,无法解决该问题。

JohnsonZZZ commented 7 years ago

@shwenzhang

shwenzhang commented 7 years ago

preverify 在日志可以看到具体是哪一类出现preverify, 然后查找他为什么会在补丁之前就会加载

JohnsonZZZ commented 7 years ago

热修复设置加固属性, 采用未加固包或者不支持的加固包(比如某度加固)会出现这个问题。已解决。