title: dagger.internal.codegen.ComponentProcessor was unable to process this interface because not all of its dependencies could be resolved
body: <p>I've been trying to setup dagger in a multimodule project. My setup is the following:</p>
  
  <pre><code>@Singleton
  @Component(modules = [AndroidSupportInjectionModule::class, NetworkModule::class, MovieListActivityModule::class, DetailActivityModule::class])
  interface AppComponent {
  
      @Component.Builder
      interface Builder {
          @BindsInstance
          fun application(application: Application): Builder
  
          fun build(): AppComponent
      }
  
      fun inject(app: MoviesApplication)
  }
  
  @Module
  class NetworkModule { .... }
  
  @Module
  abstract class MovieListActivityModule {
      @ContributesAndroidInjector(modules = [ListFragmentModule::class, ListNetworkModule::class, ListViewModelsModule::class])
      abstract fun bindMovieListActivity(): MovieListActivity
      }
  
  @Module
  abstract class ListFragmentModule {
  
      @ContributesAndroidInjector
      abstract fun bindListFragment(): ListFragment
  }
  
  @Module
  public class ListNetworkModule {
  
      @Provides
      SearchService providesSearchService(Retrofit retrofit) {
          return retrofit.create(SearchService.class);
      }
  }
  
  @Module
  abstract class ListViewModelsModule {
  
      @Binds
      abstract fun bindDaggerViewModelFactory(daggerViewModelFactory: DaggerViewModelFactory): ViewModelProvider.Factory
  
      @Binds
      @IntoMap
      @ViewModelKey(ListViewModel::class)
      abstract fun bindListViewModel(listViewModel: ListViewModel): ViewModel
  }
  
  @Module
  abstract class DetailActivityModule {
      @ContributesAndroidInjector(modules = [DetailViewModelsModule::class, DetailNetworkModule::class, DbModule::class])
      abstract fun bindDetailActivity(): DetailActivity
  }
  
  @Module
  abstract class DetailViewModelsModule {
  
      @Binds
      abstract fun bindDaggerViewModelFactory(daggerViewModelFactory: DaggerViewModelFactory): ViewModelProvider.Factory
  
      @Binds
      @IntoMap
      @ViewModelKey(DetailsViewModel::class)
      abstract fun bindDetailViewModel(detailsViewModel: DetailsViewModel): ViewModel
  }
  
  @Module
  public class DetailNetworkModule {
  
      @Provides
      DetailService providesDetailService(Retrofit retrofit) {
          return retrofit.create(DetailService.class);
      }
  }
  
  @Module
  class DbModule {
      @Provides
      fun providesFavouriteMovieDb(application: Application): FavMovieDb = FavMovieDb.getDatabase(application)
  }
  
  class DaggerViewModelFactory @Inject constructor(
          private val creators: Map&lt;Class&lt;out ViewModel&gt;, @JvmSuppressWildcards Provider&lt;ViewModel&gt;&gt;)
      : ViewModelProvider.Factory {.........}
  
  @Target(AnnotationTarget.FUNCTION)
  @Retention(AnnotationRetention.RUNTIME)
  @MapKey
  annotation class ViewModelKey(val value: KClass&lt;out ViewModel&gt;)
  
  class App : Application(), HasActivityInjector {
      @Inject
      lateinit var dispatchingActivityInjector: DispatchingAndroidInjector&lt;Activity&gt;
  
      override fun onCreate() {
          super.onCreate()
          DaggerAppComponent.builder()
                  .application(this)
                  .build()
                  .inject(this)
      }
  
      override fun activityInjector(): DispatchingAndroidInjector&lt;Activity&gt;? = dispatchingActivityInjector
  }
  </code></pre>
  
  <p>Till this code everything was ok and works perfectly. But problem appears when I add a new <code>FavouriteActivityModule</code> in <code>AppComponent</code>. Like below:</p>
  
  <pre><code>@Module
  abstract class FavouriteViewModelModule {
  
      @Binds
      abstract fun bindDaggerViewModelFactory(daggerViewModelFactory: DaggerViewModelFactory): ViewModelProvider.Factory
  
      @Binds
      @IntoMap
      @ViewModelKey(FavouriteViewModel::class)
      abstract fun bindFavouriteViewModel(viewModel: FavouriteViewModel): ViewModel
  }
  
  @Module
  abstract class FavouriteActivityModule {
      @ContributesAndroidInjector(modules = [FavouriteViewModelModule::class, DbModule::class])
      abstract fun bindFavouriteActivity(): FavoriteActivity
  }
  </code></pre>
  
  <p>Final AppComponent looks like this (added <code>FavouriteActivityModule::class</code>):</p>
  
  <pre><code>@Singleton
  @Component(modules = [AndroidSupportInjectionModule::class, NetworkModule::class, MovieListActivityModule::class, DetailActivityModule::class, FavouriteActivityModule::class])
  interface AppComponent {
  
      @Component.Builder
      interface Builder {
          @BindsInstance
          fun application(application: Application): Builder
  
          fun build(): AppComponent
      }
  
      fun inject(app: MoviesApplication)
  }
  </code></pre>
  
  <p>After adding <code>FavouriteActivityModule::class</code> dagger is no more building and complaining like below:</p>
  
  <pre><code>e: /Users/...../di/AppComponent.java:8: error: [ComponentProcessor:MiscError] dagger.internal.codegen.ComponentProcessor was unable to process this interface because not all of its dependencies could be resolved. Check for compilation errors or a circular dependency with generated code.
  public abstract interface AppComponent {
              ^
  </code></pre>
  
  <p>I've not figured out the reason yet and already spent whole day finding out the reason of this error. Any help? TIA </p>