In my module, in my base Application class
component = DaggerCompClassComponent.builder()
.classModule(new ModuleClass()).build();
If you have several modules in your AndroidStudio (modules in terms of Android Studio, not Dagger), another possible reason of fail is that you've forgot to put annotation processors into the all modules' build.gradle
.
We've divided our app into several modules, updated dependencies from using implementation
to using api
but forgot to handle annotation processors accordingly.
So, you can have this lines only in a root module:
api 'com.google.dagger:dagger-android:2.16'
// if you use the support libraries
api 'com.google.dagger:dagger-android-support:2.16'
But this ones should be specified in all modules dependencies:
annotationProcessor 'com.google.dagger:dagger-compiler:2.16'
// if you use injections to Android classes
annotationProcessor 'com.google.dagger:dagger-android-processor:2.16'