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 :
I was getting the same error message, but my case was different than yours. The unresolved reference appeared only when generating signed APK. This is how I solved it:
app/build.gradle
kapt {
generateStubs = true
}
dependencies {
//...
implementation 'com.google.dagger:dagger:2.9'
kapt 'com.google.dagger:dagger-compiler:2.9'
}
I can now deploy my signed APK without errors