79341321

Date: 2025-01-09 03:47:30
Score: 3.5
Natty:
Report link

Even I have this error, I suggest a way put the exact version they are giving the documentation.

For kotlin 1.9.22:

plugins {
  ...
  id("com.google.dagger.hilt.android") version "2.51.1" apply false
}

//in app.gradle

plugins {
  id("kotlin-kapt")
  id("com.google.dagger.hilt.android")
}

android {
  ...
}

dependencies {
  implementation("com.google.dagger:hilt-android:2.51.1")
  kapt("com.google.dagger:hilt-android-compiler:2.51.1")
}

// Allow references to generated code
// I think this line is the GameChanger. I didn't see this in above response. suggestion and explanation are welcome..

kapt {
  correctErrorTypes = true
}

Hence the Error will be solved

Upvote if your found Helpfull

Reasons:
  • Blacklisted phrase (0.5): Upvote
  • RegEx Blacklisted phrase (1): I have this error
  • RegEx Blacklisted phrase (2): Even I have
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: KEERTHIVASAN S