title: Dagger can not find classes generated by other annotation processor
body: <p>I have written a simple Annotation Processor (just for fun) that will generate some boilerplate code that I have been writing in my previous project. It actually generates a module like following by collecting annotations on Activity classes</p>
  
  <pre><code>@Module
  abstract class ActivityInjectorModule {
    @ContributesAndroidInjector
    abstract fun providesMain2Activity(): Main2Activity
  
    @ContributesAndroidInjector
    abstract fun providesMainActivity(): MainActivity
  }
  </code></pre>
  
  <p>However, when I run it with dagger, <strong>dagger can't seem to find classes generated by my annotation processor</strong>. Although, class is generated and present in generated directory, I can use it in my source code but on compilation, dagger produces the following exception. Any expert suggestion?</p>
  
  <pre><code>error: cannot find symbol
  @dagger.Component(modules = {dagger.android.AndroidInjectionModule.class, com.mallaudin.daggietest.di.AppModule.class, ActivityInjectorModule.class})
                                                                                                                         ^
    symbol: class ActivityInjectorModule
  </code></pre>
  
  <p>This is the main app component.</p>
  
  <pre><code>@Singleton
  @Component(
      modules = [
          AndroidInjectionModule::class,
          AppModule::class,
          ActivityInjectorModule::class
      ]
  )
  interface AppComponent : AndroidInjector&lt;App&gt; {
  
  
      @Component.Builder
      interface Builder {
  
          fun addContext(@BindsInstance ctx: Context): Builder
  
          fun build(): AppComponent
      }
  }
  </code></pre>
  
  <p><strong>ActivityInjectorModule</strong> class is generated by annotation processor and exists in the generated directory.</p>
  
  <p>Application class</p>
  
  <pre><code>class App : DaggerApplication() {
      override fun applicationInjector(): AndroidInjector&lt;out DaggerApplication&gt; {
          return DaggerAppComponent.builder().addContext(this).build()
      }
  }
  </code></pre>
  
  <blockquote>
    <p><strong>Everything works perfectly, if I create the generated class myself.
    Somehow on compile time, dagger is unable to find the class when generated  by my annotation processor.</strong></p>
  </blockquote>
  
  <p>After Yuriy Kulikov's answer,</p>
  
  <p><a href="https://i.stack.imgur.com/ez0Nm.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ez0Nm.png" alt="yurily&#39;s answer"></a></p>
  
  <p>You can see generated file is in the same package but also referenced with fully qualified name. Still dagger reports errors.</p>
  
  <p><strong>Here is the <a href="https://github.com/allaudin/DaggieTest" rel="noreferrer">link</a> to github repository if someone wants to experiment</strong> </p>