title: cannot be provided without an @Provides-annotated method Dagger/MissingBinding
body: <p>Unable to inject presenter to Activity</p>
  
  <p><strong>BookDashboard -> Activity</strong></p>
  
  <pre><code>class BookDashboard : AppCompatActivity(),BookDashboardContract.MvpView{
  
      @Inject
      lateinit var presenter: BookDashboardContract.Presenter
  
      override fun onCreate(savedInstanceState: Bundle?) {
          super.onCreate(savedInstanceState)
          presenter.fetchedBooks() 
          // if I pass no parameter to BookPresenter than UninitializedPropertyAccessException: lateinit property presenter has not been initialized
      }
  
      override fun displayBooks() {
          Toast.makeText(this,"Books Displayed",Toast.LENGTH_LONG).show()
      }
  
      override fun showProgress() {}
      override fun hideProgress() {}
  }
  </code></pre>
  
  <p><strong>BookDashboardContract</strong></p>
  
  <pre><code>interface BookDashboardContract {
  
      interface MvpView{
          fun displayBooks()
          fun showProgress()
          fun hideProgress()
      }
  
      interface Presenter{
          fun fetchedBooks()
      }
  }
  </code></pre>
  
  <p><strong>BookDashboardPresenter</strong>
  If I pass no parameter to below constructor app will run but still presenter is not injected
  and crashed at presenter.fetchBooks() in <strong>BookDashboard</strong> -> <code>Activity</code> __ See comments in that code</p>
  
  <pre><code>class BookDashboardPresenter @Inject constructor(val viewContract:BookDashboardContract.MvpView) : BookDashboardContract.Presenter{
  
      val bookInteractor = BookInteractor(this)
  
      override fun fetchedBooks() {
          bookInteractor.fetchDataFromServer()
          viewContract.displayBooks()
      }
  }
  </code></pre>
  
  <p><strong>ActivityBuilder</strong></p>
  
  <pre><code>@Module
  abstract class ActivityBuilder {
  
      @ContributesAndroidInjector(modules = {BookDashboardModule.class})
      @ActivityScope
      public abstract BookDashboard bindBookDashboard();
  }
  </code></pre>
  
  <p><strong>BookDashboardModule</strong></p>
  
  <pre><code>@Module
  abstract class BookDashboardModule {
  
      @Binds
      @ActivityScope
      abstract fun presenter(presenter: BookDashboardPresenter): BookDashboardContract.Presenter
  }
  </code></pre>
  
  <blockquote>
    <p>Second approach I used. But still presenter isn't injected</p>
  </blockquote>
  
  <pre><code> @Module
   class BookDashboardModule(val mvpView: BookDashboardContract.MvpView) {
  
      @Provides
      @ActivityScope
      fun providesCategoryView(): BookDashboardContract.MvpView {
          return this.mvpView
      }
  
      @Provides
      @ActivityScope
      fun provideBookPresenter(): BookDashboardPresenter {
          return BookDashboardPresenter(mvpView)
      }
  }
  </code></pre>
  
  <blockquote>
    <p>@Subcomponent.Factory method is missing parameters for required modules or subcomp</p>
  </blockquote>
  
  <pre><code>@Module(subcomponents = ActivityBuilder_BindBookDashboard.BookDashboardSubcomponent.class)
  public abstract class ActivityBuilder_BindBookDashboard {
    private ActivityBuilder_BindBookDashboard() {}
  
    @Binds
    @IntoMap
    @ClassKey(BookDashboard.class)
    abstract AndroidInjector.Factory&lt;?&gt; bindAndroidInjectorFactory(
        BookDashboardSubcomponent.Factory builder);
  
    @Subcomponent(modules = BookDashboardModule.class)
    @ActivityScope
    public interface BookDashboardSubcomponent extends AndroidInjector&lt;BookDashboard&gt; {
      @Subcomponent.Factory
      interface Factory extends AndroidInjector.Factory&lt;BookDashboard&gt; {}
    }
  }
  </code></pre>
  
  <p><strong>Edit</strong></p>
  
  <p>As Onik comment I have replace AppCompatActivity with DaggerAppCompatActivity but still unable to inject presenter</p>
  
  <p><strong>MvpView cannot be provided without an @Provides-annotate</strong></p>
  
  <pre><code>/Users/geek/StudioProjects/MyApplication/app/build/tmp/kapt3/stubs/debug/quiz/mania/trivia/mcq/question/di/AppComponent.java:8: error: [Dagger/MissingBinding] quiz.mania.trivia.mcq.question.booksmvp.contract.BookDashboardContract.MvpView cannot be provided without an @Provides-annotated method.
  public abstract interface AppComponent extends dagger.android.AndroidInjector&lt;quiz.mania.trivia.mcq.question.App&gt; {
                  ^
        quiz.mania.trivia.mcq.question.booksmvp.contract.BookDashboardContract.MvpView is injected at
            quiz.mania.trivia.mcq.question.booksmvp.presenter.BookDashboardPresenter(viewContract)
        quiz.mania.trivia.mcq.question.booksmvp.presenter.BookDashboardPresenter is injected at
            quiz.mania.trivia.mcq.question.di.BookDashboardModule.presenter(presenter)
        quiz.mania.trivia.mcq.question.booksmvp.contract.BookDashboardContract.Presenter is injected at
            quiz.mania.trivia.mcq.question.booksmvp.BookDashboard.presenter
        quiz.mania.trivia.mcq.question.booksmvp.BookDashboard is injected at
            dagger.android.AndroidInjector.inject(T) [quiz.mania.trivia.mcq.question.di.AppComponent → quiz.mania.trivia.mcq.question.di.ActivityBuilder_BindBookDashboard.BookDashboardSubcomponent]
  </code></pre>
  
  <p><strong>AppComponent</strong></p>
  
  <pre><code>@Component(
      modules = [
          AndroidInjectionModule::class, // why it is necessary to use this class for injecting purpose
          AppModule::class,
          ActivityBuilder::class
      ]
  )
  @Singleton
  interface AppComponent : AndroidInjector&lt;App&gt; {
  
      @Component.Builder
      interface Builder {
  
          fun addContext(@BindsInstance context: Context): Builder
  
          fun build(): AppComponent
      }
  }
  </code></pre>
  
  <p><strong>App.kt</strong></p>
  
  <pre><code>class App : DaggerApplication() {
  
      override fun applicationInjector(): AndroidInjector&lt;out DaggerApplication&gt; {
          return DaggerAppComponent.builder().addContext(this).build()
      }
  }
  </code></pre>