Error: cannot find symbol variable DaggerAppComponent

后端 未结 8 1786
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-19 08:50

While trying to integrate latest Dagger 2 version, I am facing problem of Dagger auto generation. Dagger is not auto generating DaggerAppComponent in spite of several Rebuilds a

8条回答
  •  梦毁少年i
    2021-02-19 09:23

    You need these two lines

    implementation 'com.google.dagger:dagger:2.16'
    kapt 'com.google.dagger:dagger-compiler:2.16'
    

    Use kapt instead of annotationProcessor when using kotlin. Generated class like Dagger+AppComponentClass, eg:DaggerAppComponent

提交回复
热议问题