@HiltAndroidApp to have a value. Did you forget to apply the Gradle Plugin? 해결
2022. 5. 14. 14:08ㆍAndroid/Bug
에러 로그
error: [Hilt]
public final class OpggApplication extends android.app.Application {
^
Expected @HiltAndroidApp to have a value. Did you forget to apply the Gradle Plugin? (dagger.hilt.android.plugin)
See https://dagger.dev/hilt/gradle-setup.html
[Hilt] Processing did not complete. See error above for details.
원인
kotlin 1.5.20 kapt 관련해서 생기는 문제
해결 방법
1. kotlin version 을 낮춤 > 1.5.20 에서 1.5.10
2. kotlin version 을 높임 > 1.5.20 에서 1.5.21
3. 1.5.20 이용 > annotation 설정
kapt {
javacOptions {
option("-Adagger.fastInit=ENABLED")
option("-Adagger.hilt.android.internal.disableAndroidSuperclassValidation=true")
}
}