I am using the new Hilt library for Dependency Injection version 2.28-alpha. I have followed the Hilt documentation and annotated the Application class with the @HiltAndroidApp
annotation. But when I am trying to build my project, its throwing a huge list of errors all similar to:
error: package {ApplicationClassName}_HiltComponents does not exist
public final class Dagger{ApplicationClassName}_HiltComponents_ApplicationC extends
{ApplicationClassName}_HiltComponents.ApplicationC {
I have searched for it but since its a new library, there is not much QnA available for it. Why is it throwing that error and how do I resolve it?
Just Build -> Rebuild Project
worked for me.
If someone else has the same problem and rebuilding the project doesn't work, feel free to comment your problem. If someone knows why it happens, please enlighten us with your answer.