I'm trying to add Dagger2 to my project in Android Studio.
This is my dependencies.
compile 'com.google.dagger:dagger:2.8'
annotationProcessor 'com.google.dagger:dagger-compiler:2.8'
provided 'javax.annotation:jsr250-api:1.0'
I am following this example.
https://guides.codepath.com/android/Dependency-Injection-with-Dagger-2#advantages
I am getting this error.
Can not resolve symbol DaggerNetComponent
I tried changing dependencies and other solution found after googling. but no luck.
Can anyone help me on this?
The DaggerNetComponent is generated after compilation. You should enable annotation processing in compilation to generate that file. This link has the details.
These generated file should be added to the source path of the project to get recognized.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With