Unable to resolve character for dagger component in android

I am trying to add Dagger2 to my project in Android Studio.

These are my addictions.

compile 'com.google.dagger:dagger:2.8'
annotationProcessor 'com.google.dagger:dagger-compiler:2.8'
provided 'javax.annotation:jsr250-api:1.0'

I follow this example.

https://guides.codepath.com/android/Dependency-Injection-with-Dagger-2#advantages

I get this error.

Unable to resolve DaggerNetComponent character

I tried changing the dependencies and another solution found after googling. but no luck.

Can someone help me with this?

+4
source share
1 answer

DaggerNetComponent is generated after compilation. You must enable annotation processing in compilation to create this file. This link contains data.

This generated file must be added to the project's source path for recognition.

+3
source

Source: https://habr.com/ru/post/1664472/


All Articles