@qualifier Causes: [dagger/missingbinding] When Field Injecting
I'm having this issue: ApplicationComponent.java:8: error: [Dagger/MissingBinding] @... java.text.SimpleDateFormat cannot be provided without an @Provides-annotated method. Modul
Solution 1:
I've opened an issue in google/Daggers repo and this PR will "fix" this. Actually, this is not a bug and as zsmb13 mentioned:
From the official Kotlin docs:
If you don't specify a use-site target, the target is chosen according to the @Target annotation of the annotation being used. If
there are multiple applicable targets, the first applicable target from the following list is used:
param; property; field.
So basically, it's because param is the default target when it's not specified.
But this PR will be very helpful to avoid this situations in the future.
EDIT: Dagger 2.25.2 fixes it.
Post a Comment for "@qualifier Causes: [dagger/missingbinding] When Field Injecting"