google / iosched

The Google I/O Android App
Apache License 2.0
21.77k stars 6.2k forks source link

Build issue: "The Hilt Android Gradle plugin is applied but no com.google.dagger:hilt-android dependency was found" #369

Closed RahulSDeshpande closed 3 years ago

RahulSDeshpande commented 3 years ago

I cloned this repo, & tried to import it to Android Studio 2020.3.1. Beta 1.

The project is not getting built due to this error:

A problem occurred configuring project ':ar'.
> The Hilt Android Gradle plugin is applied but no com.google.dagger:hilt-android dependency was found.

* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Exception is:
org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':ar'.
    ....
Caused by: java.lang.IllegalStateException: The Hilt Android Gradle plugin is applied but no com.google.dagger:hilt-android dependency was found.
    at dagger.hilt.android.plugin.HiltGradlePlugin.verifyDependencies(HiltGradlePlugin.kt:281)
    at dagger.hilt.android.plugin.HiltGradlePlugin.access$verifyDependencies(HiltGradlePlugin.kt:50)
    at dagger.hilt.android.plugin.HiltGradlePlugin$apply$2.execute(HiltGradlePlugin.kt:65)
    at dagger.hilt.android.plugin.HiltGradlePlugin$apply$2.execute(HiltGradlePlugin.kt:50)

This is my Android Studio configuration.

Android Studio Arctic Fox | 2020.3.1 Beta 1
Build #AI-203.7717.56.2031.7360992, built on May 14, 2021
Runtime version: 11.0.10+0-b96-7281165 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 11.2.3
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 12
Registry: external.system.auto.import.disabled=true
shriharsha-bhagwat commented 3 years ago

Same issue +1

sabin19 commented 3 years ago

Same issue

1240 commented 3 years ago

Same

UPD: Fixed by com.google.dagger:hilt-android-gradle-plugin:2.36

JoseAlcerreca commented 3 years ago

Fixed in #373