Dagger/Hilt is throwing an error during build that...
# dagger
d
Dagger/Hilt is throwing an error during build that's making me confused:
Copy code
BookStoreNotesApplication_HiltComponents.ViewModelC repeats modules with scoped bindings or declarations:
More details in thread!
1
The full error is:
Copy code
public abstract static class SingletonC implements FragmentGetContextFix.FragmentGetContextFixEntryPoint,
                         ^
    - example.BookStoreNotesApplication_HiltComponents.SingletonC also includes:
      - example.BookStoreApiModule with scopes: @javax.inject.Singleton
      - example.BookStoreDatabaseModule with scopes: @javax.inject.Singleton
My code is as follows
Honestly I've no ideia why Hilt is complaining about the
@Singleton
scope. Both ApiModule and DatabaseModule have singletons for totally different things 🤔 why is it saying that it's repeating modules with scoped bindings/declarations?
Oh nevermind, I was being dumb. I didn't have to create a Module that contains all other Modules at all. Simply deleting the
BookStoreModule
file made it work