title: error: [dagger.android.AndroidInjector.inject(T)] Found a dependency cycle
body: <p>Can any one tell me why this error is showing. I tried a lot some stackoverflow post, but can not identify. Am struggling with this error for whole day. before dagger 2.11 it was working fine. after updating to 2.11 is the error.</p>
  
  <pre><code>        E:\studio projects\MVP-Login\app\build\tmp\kapt3\stubs\debug\com\example\anbu\mvpkotlin\di\component\AppComponent.java:8: error: [dagger.android.AndroidInjector.inject(T)] Found a dependency cycle:
  public abstract interface AppComponent {
              ^
    com.example.anbu.mvpkotlin.data.network.NccApi is injected at
        com.example.anbu.mvpkotlin.di.modules.AppModules.provideAPI$app_debug(apiManager)
    com.example.anbu.mvpkotlin.data.network.NccApi is injected at
        com.example.anbu.mvpkotlin.ui.accounts.interactor.AccountInteractor.&lt;init&gt;(…, api)
    com.example.anbu.mvpkotlin.ui.accounts.interactor.AccountInteractor is injected at
        com.example.anbu.mvpkotlin.ui.accounts.AccountModule.provideAccountInteractor$app_debug(accountInteractor)
    com.example.anbu.mvpkotlin.ui.accounts.interactor.AccountInteractorContract is injected at
        com.example.anbu.mvpkotlin.ui.accounts.presenter.AccountPresenter.&lt;init&gt;(interactor, …)
    com.example.anbu.mvpkotlin.ui.accounts.presenter.AccountPresenter&lt;com.example.anbu.mvpkotlin.ui.accounts.view.AccountViewContract,com.example.anbu.mvpkotlin.ui.accounts.interactor.AccountInteractorContract&gt; is injected at
        com.example.anbu.mvpkotlin.ui.accounts.AccountModule.provideAccountPresenter$app_debug(accountPresenter)
    com.example.anbu.mvpkotlin.ui.accounts.presenter.AccountPresenterContract&lt;com.example.anbu.mvpkotlin.ui.accounts.view.AccountViewContract,com.example.anbu.mvpkotlin.ui.accounts.interactor.AccountInteractorContract&gt; is injected at
        com.example.anbu.mvpkotlin.ui.accounts.view.AccountActivity.presenter
    com.example.anbu.mvpkotlin.ui.accounts.view.AccountActivity is injected at
        dagger.android.AndroidInjector.inject(arg0)
  </code></pre>
  
  <p>Here is my AppComponent class I have added in my project. It is not exactly abstract as the error shows.</p>
  
  <pre><code>    @Singleton
  @Component(modules = [(AndroidInjectionModule::class), (ActivityBuilder::class),
      (AppModules::class)])
  interface AppComponent {
  
      @Component.Builder
      interface Builder {
  
          @BindsInstance
          fun application(application: Application): Builder
  
          fun build(): AppComponent
      }
  
      fun inject(app: MyApplication)
  
  }
  </code></pre>
  
  <p>And here is Application Module class I have added in my project. </p>
  
  <pre><code>@Module
  class AppModules {
  
  @Provides
  @Singleton
  internal fun provideContext(application: Application): Context = application
  
  @Provides
  @PreferenceInfo
  internal fun providePrefName(): String = AppConstants.PREF_NAME
  
  @Provides
  @Singleton
  internal fun providePreference(prefManager: PrefManager): 
  PrefManagerContract = prefManager
  
  @Provides
  @Singleton
  internal fun provideAppDatabase(context: Context): NccDatabase =
          Room.databaseBuilder(context, NccDatabase::class.java, "****")
                  .allowMainThreadQueries()
                  .fallbackToDestructiveMigration()
                  .build()
  
  @Provides
  internal fun provideCompositeDisposable(): CompositeDisposable = 
  CompositeDisposable()
  
  @Provides
  @Singleton
  internal fun provideAPI(apiManager: NccApi): NccApi = apiManager
  
  @Provides
  internal fun provideSchedulerProvider(): SchedulerProvider = 
  SchedulerProvider()
  
  /*@Provides
  @Singleton
  internal fun providerTokenManager(): TokenManager = TokenManager()*/
  </code></pre>
  
  <p>This is my AccountModule class</p>
  
  <pre><code>            @Module
      class AccountModule {
  
          @Provides
          internal fun provideAccountInteractor(accountInteractor: AccountInteractor): AccountInteractorContract = accountInteractor
  
          @Provides
          internal fun provideAccountPresenter(accountPresenter: AccountPresenter&lt;AccountViewContract, AccountInteractorContract&gt;)
                  : AccountPresenterContract&lt;AccountViewContract, AccountInteractorContract&gt; = accountPresenter
      }
  </code></pre>
  
  <p>Here is my Retrofit web services interface</p>
  
  <pre><code>public interface NccApi {
  
          Observable&lt;Profile&gt; getProfile(@Url String url, @Header("authorization") String auth);
  
          @POST
          Call&lt;SigninResponseModel&gt; refreshToken(@Url String url, @Header("authorization") String auth, @Body RefreshTokenRequest body);
      }
  </code></pre>
  
  <p>Here is my retrofit module class</p>
  
  <pre><code>        @Module
      class RetrofitModule(internal var mBaseUrl: String) {
  
      @Provides
      @Singleton
      internal fun provideInterceptor(): okhttp3.Interceptor {
          val interceptorAPI = Interceptor { chain -&gt;
              val original = chain.request()
              var request: Request? = null
              try {
                  request = chain.request().newBuilder()
                          .addHeader("Content-Type", "application/json")
                          .method(original.method(), original.body())
                          .build()
              } catch (authFailureError: Exception) {
                  authFailureError.printStackTrace()
              }
  
              val response = chain.proceed(request)
  
              response
          }
          return interceptorAPI
      }
  
      @Provides
      @Singleton
      internal fun provideGson(): Gson {
          val gsonBuilder = GsonBuilder()
          return gsonBuilder.create()
      }
  
      @Provides
      @Singleton
      internal fun provideOkHttpClient(interceptor: Interceptor): OkHttpClient {
          val okHttpBuilder = OkHttpClient.Builder()
          okHttpBuilder.interceptors().add(interceptor)
          val logging = HttpLoggingInterceptor()
          logging.setLevel(HttpLoggingInterceptor.Level.BODY)
          okHttpBuilder.interceptors().add(logging)
          val client = okHttpBuilder.build()
          return client
      }
  
      @Provides
      @Singleton
      internal fun provideRetrofit(gson: Gson, okHttpClient: OkHttpClient): Retrofit {
          val retrofit = Retrofit.Builder().addConverterFactory(GsonConverterFactory.create(gson))
                  .baseUrl(mBaseUrl)
                  .client(okHttpClient)
                  .build()
          return retrofit
      }
      }
  </code></pre>
  
  <p>Here is my Application class</p>
  
  <pre><code>class MyApplication : Application(), HasActivityInjector {
  
      @Inject
      lateinit internal var activityDispatchingAndroidInjector: DispatchingAndroidInjector&lt;Activity&gt;
  
      override fun activityInjector() = activityDispatchingAndroidInjector
  
      override fun onCreate() {
          super.onCreate()
  
          DaggerAppComponent.builder()
                  .application(this)
                  .appmodule(AppModules())
                  .retrofitModule(RetrofitModule(""))
                  .build()
                  .inject(this)
  
      }
      }
  </code></pre>