I added a new Retrofit interface to my project containing a couple of Endpoints annotated with the @GET
and @HEADERS
annotations, after Injecting said interface to a repository class using the @Inject
annotation in the constructor of said class, Android Studio throws this error:
NonExistentClass cannot be converted to Annotation
After taking a look at the generated Java code, it replaces the @GET
and @HEADERS
annotations with this:
@error.NonExistentClass()
I've already tried the following:
Using
annotatioProcessor
instead ofkapt
Setting
jetifier.enabled
tofalse
ingradle.properties
Setting
generateStubs
totrue
in mybuild.gradle
fileSetting
correctErrorTypes
totrue
in mybuild.gradle
file
Im using:
Android Studio 3.3
Kotlin 1.3.11
Dagger 2.21
Retrofit 2.3.0
Kotlin
Kapt
could it be some dagger scope issue? or Retrofit / dagger not fully compatible with the new versions of the Kapt plugin?
See Question&Answers more detail:os