[Bug] Dagger fails and gives an unhelpful error message when trying to inject a class with no injectable members
I am using a method to inject fragments, and some don't have any dependencies (and thus don't have any @Inject fields or constructors). It would be awesome if Dagger would continue when trying to inject a class without an @Inject annotation.
I have been debugging for some time trying to figure this out. I also would suggest changing this error message:
java.lang.IllegalStateException: Unable to create binding for com.example.type
at Linker.java:147 to something like a log message, and changing it to something like
no injectable members found in com.example.type
It would be awesome if Dagger would continue when trying to inject a class without an
@Injectannotation.
If the type is listed in a module's injects this should work. It does for me, as far as I can tell.
Whoops. Bad habit of reply+close :)
@JakeWharton Interesting, that's not how it's working for me. I'll see if I can get it down to a minimal reproducable state.