Dagger2 + Kotlin,注射不起作用

不幸的是,Dagger2没有创建要注入的对象的实例。

  • 匕首:2.0.2
  • Kotlin:1.0.1-2

源代码? 这里

零件:

@ActivityScope @Component(dependencies = ApplicationComponent.class, modules = { HomeModule.class }) public interface HomeComponent { void inject(HomeActivity homeActivity); HomePresenter homePresenter(); } 

模块:

 @Module public class HomeModule { @Provides @ActivityScope HomePresenter provideHomePresenter( HomePresenterImpl presenter) { return presenter; } } 

Kotlin language will be the best programming language for Android.