title: @Inject set Not Injecting Property
body: <p>I am attempting to use the <a href="https://google.github.io/dagger//android.html" rel="nofollow noreferrer">Android Dagger ‡ implementation</a> and inject a <code>DispatchingAndroidInjector</code> into my <code>Application</code> class:</p>
  
  <pre><code>class MyApp : Application(), HasActivityInjector {
  
      private lateinit var dispatchingAndroidInjector: DispatchingAndroidInjector&lt;Activity&gt;
          @Inject set    
  
      override fun onCreate() {
          super.onCreate()
          AppInjector.init(this)
      }
  
      override fun activityInjector(): ActivityInjector&lt;Activity&gt; {
          return dispatchingAndroidInjector
      }
  
  }
  </code></pre>
  
  <p>But I get an <code>IllegalArgumentExecption</code> stating that the "<code>lateinit</code> property has not been initialized":</p>
  
  <pre><code>06-19 10:57:30.773 10797-10797/com.example.app E/AndroidRuntime: FATAL EXCEPTION: main
          Process: com.example.app, PID: 10797
          java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.app/com.example.app.ui.MainActivity}: kotlin.UninitializedPropertyAccessException: lateinit property dispatchingAndroidInjector has not been initialized
              at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2666)
              at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2727)
              at android.app.ActivityThread.-wrap12(ActivityThread.java)
              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1478)
              at android.os.Handler.dispatchMessage(Handler.java:102)
              at android.os.Looper.loop(Looper.java:154)
              at android.app.ActivityThread.main(ActivityThread.java:6121)
              at java.lang.reflect.Method.invoke(Native Method)
              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
           Caused by: kotlin.UninitializedPropertyAccessException: lateinit property dispatchingAndroidInjector has not been initialized
              at com.example.app.MyApp.activityInjector(MyApp.kt:28)
              at dagger.android.AndroidInjection.inject(AndroidInjection.java:55)
              at com.example.app.injection.AppInjector.handleActivity(AppInjector.kt:41)
              at com.example.app.injection.AppInjector.access$handleActivity(AppInjector.kt:14)
              at com.example.app.injection.AppInjector$init$1.onActivityCreated(AppInjector.kt:21)
              at android.app.Application.dispatchActivityCreated(Application.java:197)
              at android.app.Activity.onCreate(Activity.java:961)
              at android.support.v4.app.BaseFragmentActivityGingerbread.onCreate(BaseFragmentActivityGingerbread.java:54)
              at android.support.v4.app.FragmentActivity.onCreate(FragmentActivity.java:319)
              at com.example.app.ui.MainActivity.onCreate(MainActivity.kt:20)
              at android.app.Activity.performCreate(Activity.java:6682)
              at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
              at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2619)
              at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2727) 
              at android.app.ActivityThread.-wrap12(ActivityThread.java) 
              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1478) 
              at android.os.Handler.dispatchMessage(Handler.java:102) 
              at android.os.Looper.loop(Looper.java:154) 
              at android.app.ActivityThread.main(ActivityThread.java:6121) 
              at java.lang.reflect.Method.invoke(Native Method) 
              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889) 
              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
  </code></pre>
  
  <p>This is the <code>AppInjector</code> class used to create the <code>AppComponent</code> and inject the <code>MyApp</code> dependencies:</p>
  
  <pre><code>object AppInjector {
  
      fun init(app: MyApp) {
          DaggerAppComponent.builder().application(app).build().inject(app)
          // ...
      }
  
  }
  </code></pre>
  
  <p>And the <code>AppComponent</code> interface:</p>
  
  <pre><code>@Singleton
  @Component(modules = arrayOf(
      AndroidInjectionModule::class,
      AppModule::class,
      MainActivityModule::class
  )) interface AppComponent {
  
      @Component.Builder interface Builder {
  
          @BindsInstance fun application(app: Application): Builder
  
          fun build(): AppComponent
  
      }
  
      fun inject(app: MyApp)
  
  }
  </code></pre>
  
  <p>I am using the <code>@Inject</code> annotation on the property accessor, as outlined in <a href="https://kotlinlang.org/docs/reference/annotations.html" rel="nofollow noreferrer">the documentation</a>, but it doesn't seem to be working. What am I doing wrong?</p>