Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not clone, Hilt Error #46

Open
waqas-334 opened this issue Feb 24, 2022 · 5 comments
Open

Could not clone, Hilt Error #46

waqas-334 opened this issue Feb 24, 2022 · 5 comments

Comments

@waqas-334
Copy link

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

@kl3jvi
Copy link

kl3jvi commented Mar 5, 2022

Same

@sam321pbs
Copy link

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

@matterox
Copy link

matterox commented Jul 12, 2022

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.

@naiknaveen338
Copy link

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

@sergiofdomingues
Copy link

Same issue here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants