Instant-Weather icon indicating copy to clipboard operation
Instant-Weather copied to clipboard

Could not clone, Hilt Error

Open waqas-334 opened this issue 2 years ago • 5 comments

Hey, I just cloned the latest project from the main branch but couldn't run it. As soon as the Gradle sync ends, the following error pops up. I tried many things but couldn't get it up and running.

Can you please help me with it?

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

I am running it on MacBook M1

waqas-334 avatar Feb 24 '22 15:02 waqas-334

Same

kl3jvi avatar Mar 05 '22 16:03 kl3jvi

The way I was able to fix this was by changing the javaVersion within the Dependencies.kt file to use JavaVersion.VERSION_1_8 According to the google docs hilt uses Java Version 8

sam321pbs avatar Mar 15 '22 16:03 sam321pbs

Had the same issue with M1 MacBook. Fixed it by removing id("dagger.hilt.android.plugin") and adding apply(plugin = "dagger.hilt.android.plugin") at the end of the app's build.gradle.kts file. Also, comment out hilt { enableAggregatingTask = true } Then sync gradle. Once it's done, you can uncomment hilt block, and move plugin to where it was. It should work now.

matterox avatar Jul 12 '22 20:07 matterox

Still not able to solve this issue . . anyone facing the same ?

naiknaveen338 avatar Sep 17 '22 16:09 naiknaveen338

Same issue here.

sergiofdomingues avatar Sep 19 '22 09:09 sergiofdomingues