The Hilt Android Gradle plugin is applied but no com.google.dagger:hilt-android-compiler dependency was found

I guess you re missing this dependency

kapt "com.google.dagger:hilt-android-compiler:2.28-alpha"

*First add the plugin

apply plugin: 'dagger.hilt.android.plugin'

*Secondly add the dependencies

// Dagger Core
implementation "com.google.dagger:dagger:2.37"
kapt "com.google.dagger:dagger-compiler:2.37"

// Dagger Android
api 'com.google.dagger:dagger-android:2.37'
api 'com.google.dagger:dagger-android-support:2.37'
kapt 'com.google.dagger:dagger-android-processor:2.37'

// Dagger - Hilt
implementation "com.google.dagger:hilt-android:2.37"
kapt "com.google.dagger:hilt-android-compiler:2.37"

*Thirdly add the classpath

classpath "com.google.dagger:hilt-android-gradle-plugin:2.28-alpha"

PS : if you re using java replace kapt with annotationProcessor

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)