Android Kotlin : Error Unresolved reference: DaggerAppComponent

前端 未结 4 407
悲哀的现实
悲哀的现实 2021-02-02 08:39

I have installed Kotlin plugin today into an existing project with Dagger 2. Before Kotlin was installed I had no issues with Dagger. However, now the compiler complains :

4条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-02 09:09

    Do not use private for inject dagger in Kotlin, use it like this for Kotlin

    @Inject
         internal lateinit
    

提交回复
热议问题