Tencent / tinker

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

Tinker.UncaughtHandler: TinkerUncaughtHandler catch exception:java.lang.RuntimeException: Unable to start activity ComponentInfo{ xxxx/xxxx.mvp.ui.activity.SplashActivity_V3}: java.lang.ClassCastException: xxxxx.di.component.DaggerApplicationComponent cannot be cast to xxxxx.di.component.ApplicationComponent #1333

Open xkzh opened 4 years ago

xkzh commented 4 years ago

手机运行安装项目都正常,打包手机安装项目也正常。 但是,无论是应用升级还是补丁热更新,都会报一下错误, Tinker 和 Dragger 是否冲突

Tinker.UncaughtHandler: TinkerUncaughtHandler catch exception:java.lang.RuntimeException: Unable to start activity ComponentInfo{ xxxx/ xxxx.mvp.ui.activity.SplashActivity_V3}: java.lang.ClassCastException: xxxx.di.component.DaggerApplicationComponent cannot be cast to xxxx.di.component.ApplicationComponent at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3430) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3614) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:86) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2199) at android.os.Handler.dispatchMessage(Handler.java:112) at android.os.Looper.loop(Looper.java:216) at android.app.ActivityThread.main(ActivityThread.java:7625) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987) Caused by: java.lang.ClassCastException: xxxx.di.component.DaggerApplicationComponent cannot be cast to xxxx.di.component.ApplicationComponent at xxxx.di.component.DaggerActivityComponent$Builder.applicationComponent(DaggerActivityComponent.java:1320) at xxxx.mvp.ui.activity.base.BaseActivity.initActivityComponent(BaseActivity.java:293) at xxxx.mvp.ui.activity.base.BaseActivity.onCreate(BaseActivity.java:60) at xxxx.mvp.ui.activity.SplashActivity_V3.onCreate(SplashActivity_V3.java:103) at android.app.Activity.performCreate(Activity.java:7458) at android.app.Activity.performCreate(Activity.java:7448) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1286) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3409) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3614)  at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:86)  at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)  at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2199)  at android.os.Handler.dispatchMessage(Handler.java:112)  at android.os.Looper.loop(Looper.java:216)  at android.app.ActivityThread.main(ActivityThread.java:7625)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987) 

1136346879 commented 4 years ago

解决了没 哥们