You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How does MainActivityComponent get a MainActivity context?
We can use @BindsInstance method in inner Builder interface in MainActivityComponent (Subcomponent) and specify MainActivity (or Context) as parameter or just send MainActivity's Context in constructor of MainActvityModule. But I can not find where in your sample app you send the MainActivity's context. Could you explain me, please?
The text was updated successfully, but these errors were encountered:
I am getting error bellow. what is the problem. I did what you did in post.
Error:(29, 10) error: ....ui.main.MainActivityComponent.Builder cannot be provided without an @Provides-annotated method......ui.main.MainActivityComponent.Builder is injected at .......ActivityBuilder.bindMainActivity(builder)java.util.Map<java.lang.Class<? extends android.app.Activity>,javax.inject.Provider<dagger.android.AndroidInjector.Factory<? extends android.app.Activity>>> is injected atdagger.android.DispatchingAndroidInjector.(injectorFactories)dagger.android.DispatchingAndroidInjector<android.app.Activity> is injected at ....MYApp.activityDispatchingAndroidInjector ....MYApp is injected at .....di.AppComponent.inject(app)
How does
MainActivityComponent
get a MainActivity context?We can use
@BindsInstance
method in inner Builder interface inMainActivityComponent
(Subcomponent) and specifyMainActivity
(or Context) as parameter or just send MainActivity's Context in constructor ofMainActvityModule.
But I can not find where in your sample app you send the MainActivity's context. Could you explain me, please?The text was updated successfully, but these errors were encountered: