2016-05-13 126 views
1

不幸的是,Dagger2沒有創建要注入的對象的實例。Dagger2 + Kotlin,注射不工作

  • 匕首:2.0.2
  • 科特林:1.0.1-2

源代碼? Here

組件:

@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; 
    } 
} 

回答

3

只需更新匕首的版本2.2