Reputation: 16
I have created a module named dependencies where I have put all depConstraints I need so I don't have to implement the dependency in each module individually.
I have added Hilt dependencies in my depConstraints'sgradle file but when I want to use Hilt in another module I get the following error
Hilt Android Gradle plugin is applied but no com.google.dagger:hilt-android dependency was found.
Is there a way to use the depConstraints module's dependencies in my other modules (for example app module) without implementing them individually in each module's scope?
Upvotes: 0
Views: 733
Reputation: 659
This error may not mean what it says. It pops up when anything with gradle files is wrong and obscures the real error.
Try to comment out hilt plugin import and hilt block (if exists) inside build.gradle file, then Sync Project with Gradle files - most of the time there will be another error.
I spent so much time thinking hilt was the issue, but actually it never was.
Upvotes: 1