Unresolved reference: DaggerAppComponent
depedencies i have used
// Dagger
implementation 'com.google.dagger:dagger:2.21'
implementation 'com.google.dagger:dagger-android:2.21'
implementation 'com.google.dagger:dagger-android-support:2.21'
kapt 'com.google.dagger:dagger-android-processor:2.20'
kapt 'com.google.dagger:dagger-compiler:2.20'
within App class i havee
val component: AppComponent by lazy {
DaggerAppComponent.builder()
.appModule(AppModule(this))
.build() // No need for casting here
}
AppComponent Class I have
@Singleton
@Component(modules = [
AndroidInjectionModule::class,
AppModule::class,
ActivityModule::class,
ServiceModule::class,
BroadcastReceiverModule::class
])
interface AppComponent {
fun inject(app: PragueApp)
}
I have already try all solution available but nothing works for me. it says Unresolved reference: DaggerAppComponent, I have check in build generated files, DaggerAppComponent class is available but don’t know whats wrong.
3