Error:(39, 10) error: [Dagger/MissingBinding] kz.production.kuanysh.sellings.ui.content_owner.fragments.order.orders.OrdersFragmentPresenter cannot be provided without an @Provides-annotated method.
kz.production.kuanysh.sellings.ui.content_owner.fragments.order.orders.OrdersFragmentPresenter is injected at
kz.production.kuanysh.sellings.ui.content_owner.fragments.order.orders.OrdersFragment.mPresenter
kz.production.kuanysh.sellings.ui.content_owner.fragments.order.orders.OrdersFragment is injected at
kz.production.kuanysh.sellings.di.component.ActivityComponent.inject(kz.production.kuanysh.sellings.ui.content_owner.fragments.order.orders.OrdersFragment)
Компонент:
@PerActivity
@Component(dependencies = ApplicationComponent.class, modules =
ActivityModule.class)
public interface ActivityComponent {
void inject(MainActivity activity);
void inject(LoginActivity activity);
void inject(OwnerSupplierItemFragment ownerSupplierItemFragment);
void inject(OrdersFragment ordersFragment);
}
В модуле класса:
@Module
public class ActivityModule {
private AppCompatActivity mActivity;
public ActivityModule(AppCompatActivity activity) {
this.mActivity = activity;
}
@Provides
@ActivityContext
Context provideContext() {
return mActivity;
}
@Provides
AppCompatActivity provideActivity() {
return mActivity;
}
@Provides
CompositeDisposable provideCompositeDisposable() {
return new CompositeDisposable();
}
@Provides
SchedulerProvider provideSchedulerProvider() {
return new AppSchedulerProvider();
}
@Provides
@PerActivity
LoginMvpPresenter<LoginMvpView> provideLoginPresenter(
LoginPresenter<LoginMvpView> presenter) {
return presenter;
}
@Provides
@PerActivity
MainMvpPresenter<MainMvpView> provideMainPresenter(
MainPresenter<MainMvpView> presenter) {
return presenter;
}
/*@Provides
OrdersFragmentMvpPresenter<OrdersFragmentMvpView> provideOrdersFragmentPresenter(
OrdersFragmentPresenter<OrdersFragmentMvpView> presenter) {
return presenter;
}*/
@Provides
@PerActivity
OrdersFragmentMvpPresenter<OrdersFragmentMvpView> provideOrdersFragmentPresenter(
OrdersFragmentPresenter<OrdersFragmentMvpView> presenter){
return presenter;
}
@Provides
@PerActivity
OwnerSupplierItemMvpPresenter<OwnerSupplierItemMvpView> provideOwnerSupplierItemPresenter(
OwnerSupplierItemPresenter<OwnerSupplierItemMvpView> presenter) {
return presenter;
}
@Provides
LinearLayoutManager provideLinearLayoutManager(AppCompatActivity activity) {
return new LinearLayoutManager(activity);
}
}
Мой ведущий
public class OrdersFragmentPresenter<V extends OrdersFragmentMvpView> extends
BasePresenter<V>
implements OrdersFragmentMvpPresenter<V> {
@Inject
public OrdersFragmentPresenter(DataManager dataManager, SchedulerProvider schedulerProvider, CompositeDisposable compositeDisposable) {
super(dataManager, schedulerProvider, compositeDisposable);
}
@Override
public void onViewPrepared() {
//getMvpView().updateOrders();
}
@Override
public void onDetailClick(int position) {
getMvpView().openOrderDetailFragment();
}
}