title: Dagger2 Circular Dependency Error
body: <p>I am using dagger2 2.16 version for dependency injection inside mine android project. I examine a lot of examples, and although I do not have a similar approach I get the error of "circular dependency".
  Mine source code;
  <strong>AppComponent.kt</strong></p>
  
  <pre><code>@Singleton
  @Component(
          modules = [
              AndroidSupportInjectionModule::class,
              AppModule::class,
              ActivityBuilderModule::class]
  )
  interface AppComponent {
      @Component.Builder
      interface Builder {
          @BindsInstance
          fun application(application: Application): Builder
  
          fun build(): AppComponent
      }
  
      fun inject(app: App)
  }
  </code></pre>
  
  <p><strong>App.kt</strong></p>
  
  <pre><code>class App : Application(), HasActivityInjector {
  
      @Inject
      lateinit var dispatchingAndroidInjector: DispatchingAndroidInjector&lt;Activity&gt;
  
      override fun onCreate() {
          super.onCreate()
          AppInjector.init(this)
          initOneSignal()
      }
  
      private fun initOneSignal() = OneSignal.startInit(this).setNotificationOpenedHandler(CustomNotificationOpenedHandler()).inFocusDisplaying(OneSignal.OSInFocusDisplayOption.Notification).init()
  
  
      override fun activityInjector() = dispatchingAndroidInjector
  }
  </code></pre>
  
  <p><strong>ActivityBuilderModule.kt</strong></p>
  
  <pre><code>@Module
  abstract class ActivityBuilderModule {
      @ContributesAndroidInjector
      abstract fun contributeSplashActivity(): SplashActivity
  }
  </code></pre>
  
  <p><strong>AppModule.kt</strong></p>
  
  <pre><code>@Module(includes = [(ViewModelModule::class)])
  class AppModule {
  
      @Singleton
      @Provides
      fun provideContext(app: Application): Context = app.applicationContext;
  
      @Singleton
      @Provides
      fun provideApiService(client: OkHttpClient): ApiService {
          return Retrofit.Builder()
                  .baseUrl(Constants.baseUrl)
                  .client(client)
                  .addConverterFactory(GsonConverterFactory.create())
                  .addCallAdapterFactory(RxJava2CallAdapterFactory.create())
                  .build()
                  .create(ApiService::class.java)
      }
  
      @Singleton
      @Provides
      fun provideOkHttpClient(interceptor: HttpLoggingInterceptor): OkHttpClient {
          return OkHttpClient.Builder().addInterceptor(interceptor).build()
      }
  
      @Singleton
      @Provides
      fun provideHttpLoggingInterceptor(): HttpLoggingInterceptor {
          val interceptor = HttpLoggingInterceptor()
          interceptor.level = HttpLoggingInterceptor.Level.BODY
          return interceptor
      }
  }
  </code></pre>
  
  <p>If I remove the ActivityBuilderModule from the AppComponent, the project is compiled without problems. But if you add to the modules section, the project gives the error below.</p>
  
  <blockquote>
    <p>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.</p>
  </blockquote>
  
  <p>Please help me.</p>