Dagger 2 component not generated

前端 未结 12 1567
走了就别回头了
走了就别回头了 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:06

    If you are using Kotlin, make sure to add kapt (Kotlin annotation processor) Gradle plugin to your build script and use kapt Gradle dependency type instead of annotationProcessor for Dagger Compiler.

    apply plugin: 'kotlin-kapt
    
    kapt deps.daggercompiler
    implementation deps.dagger
    

提交回复
热议问题