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

java.lang.IncompatibleClassChangeError: #977

Closed HuangHanquan closed 5 years ago

HuangHanquan commented 5 years ago

异常类型:app运行时异常

手机型号:如:Huawei mate 10

手机系统版本:9.0

tinker版本:1.9.9

gradle版本:3.3.0-beata04

是否使用热更新SDK:TinkerPatch SDK

java.lang.IncompatibleClassChangeError: Class 'android.content.Intent' does not implement interface 'android.content.DialogInterface' in call to 'void android.content.DialogInterface.dismiss()' (declaration of 'com.duoyi.ccplayer.base.BaseActivity' appears in /data/user/0/com.wanxin.douqu/tinker/patch-6bdc65fb/dex/tinker_classN.apk) 2 at com.duoyi.ccplayer.base.BaseActivity.a(SourceFile:101) 3 at com.duoyi.ccplayer.servicemodules.shares.ThirdPartyShareActivity.onCreate(SourceFile:138) 4 at android.app.Activity.performCreate(Activity.java:7436) 5 at android.app.Activity.performCreate(Activity.java:7426) 6 at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1286) 7 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3279) 8 at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3484) 9 at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:86) 10 at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) 11 at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) 12 at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2123) 13 at android.os.Handler.dispatchMessage(Handler.java:109) 14 at android.os.Looper.loop(Looper.java:207) 15 at android.app.ActivityThread.main(ActivityThread.java:7470) 16 at java.lang.reflect.Method.invoke(Native Method) 17 at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524) 18 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:958) 补丁版本已经把ThirdPartyShareActivity删除了, 补本加载成功后分享微博报这个错误

logwee commented 5 years ago

我也遇到类似问题,tinker版本1.9.8

tys282000 commented 5 years ago

额,Tinker是无法做到删除一个四大组件的。你可以删掉这个Activity类,但是同时也要删掉他在manifest里注册的intent,不然其他app调起那个被删除的Activity的时候就会出现异常了。

同时因为Tinker不支持修改manifest,所以这类变更只能通过下发全量包的方式来覆盖。