Dagger 2 component not generated

前端 未结 12 1562
走了就别回头了
走了就别回头了 2021-01-31 07:21

In my module, in my base Application class

component = DaggerCompClassComponent.builder()
                .classModule(new ModuleClass()).build();
12条回答
  •  被撕碎了的回忆
    2021-01-31 08:09

    //add all the dependencies otherwise component class will not be generated.
    implementation 'com.google.dagger:dagger-android:2.21'
    implementation 'com.google.dagger:dagger-android-support:2.21'
    annotationProcessor 'com.google.dagger:dagger-android-processor:2.21'
    implementation 'com.google.dagger:dagger:2.21'
    annotationProcessor 'com.google.dagger:dagger-compiler:2.21'
    

提交回复
热议问题