mayokunadeniyi / Instant-Weather

An Android weather application implemented using the MVVM pattern, Retrofit2, Dagger Hilt, LiveData, ViewModel, Coroutines, Room, Navigation Components, Data Binding and some other libraries from the Android Jetpack.
MIT License
768 stars 165 forks source link

Could not clone, Hilt Error #46

Open waqas-334 opened 2 years ago

waqas-334 commented 2 years ago

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 commented 2 years ago

Same

sam321pbs commented 2 years ago

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 commented 2 years ago

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 commented 1 year ago

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

sergiofdomingues commented 1 year ago

Same issue here.