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

VIVO Y27 4.4.4热修复再次打开APP崩溃 #836

Closed zhangdan1261 closed 6 years ago

zhangdan1261 commented 6 years ago

异常类型:APP热修复后打开APP崩溃

手机型号:VIVO Y27

手机系统版本:4.4.4

tinker版本:com.tencent.bugly:tinker-support:latest.release

gradle版本:2.10

是否使用热更新SDK:TinkerPatch SDK

系统:Windows

堆栈/日志: 04-16 11:31:08.720 14715-14715/? E/CrashReport: sys default last handle start! 04-16 11:31:08.720 14715-14715/? E/Tinker.TinkerUncaughtExceptionHandler: uncaughtException:Class ref in pre-verified class resolved to unexpected implementation 04-16 11:31:08.720 14715-14715/? E/Tinker.TinkerUncaughtExceptionHandler: tinker has fast crash 2 times 04-16 11:31:08.720 14715-14715/? E/Tinker.UncaughtHandler: TinkerUncaughtHandler catch exception:java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation at com.lbs.apps.zhcs.app.MyActApplicationLike.onCreate(MyActApplicationLike.java:294) at com.tencent.tinker.loader.app.TinkerApplication.onCreate(BUGLY:180) at com.lbs.apps.zhcs.app.ActApplication.onCreate(ActApplication.java:21) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1009) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4467) at android.app.ActivityThread.access$1500(ActivityThread.java:140) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1262) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5143) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602) at dalvik.system.NativeStart.main(Native Method) 04-16 11:31:08.720 14715-14715/? E/AndroidRuntime: FATAL EXCEPTION: main

wsl007 commented 6 years ago

我测试4.4.4的红米遇到同样问题,isProtectedApp = true 改为false后不再报错

zhangdan1261 commented 6 years ago

isProtectedApp = true我尝试了还是不行

tys282000 commented 6 years ago

@zhangdan1261 isProtectedApp如果base包没加固的话就一定要设置成false才行的

看堆栈你应该是自己搞了一个Application,这种情况有些额外工作要做的:

  1. 你自己的Application的完整类名要加到dex { loader {} }这个配置项里;
  2. 你自己的Application里引用其他类都要通过反射完成,包括引用tinker原本的application也是;