java - Dagger 2 trouble @Inject-ing FirebaseMessagingService -
i tried migrate application i'm working on gcm
fcm
. while doing so, found i'd been using dagger 2 (2.0.2)
provide instances of retrofit
apis , other user-data managers inside service (with no problems), no longer firebasemessagingservice
.
whenever i'd try compile subclass of firebasemessagingservice
listed in dagger 2 component
interface, i'd illegalargumentexception
. after digging through code, seems exception thrown when dagger 2
tries validate class name , finds first letter isn't uppercase. firebasemessagingservice
, @ least on end, inherits uglified / minified codebase, , immediate superclass zzb
(public class firebasemessagingservice extends com.google.firebase.iid.zzb
).
my best guess culprit. if problem, i'm not sure aside stick gcm
now. have ideas or similar experience this?
edit: got chance ask 1 of firebase developers issue: https://www.reddit.com/r/androiddev/comments/4upj1o/beware_of_the_new_firebase/d5tdbk3 - no resolution. i'm going avoid direct injection , consolidate static api provider.
after half day of struggle, moving dagger 2.7 fixed issue.
compile "com.google.dagger:dagger:2.7" apt "com.google.dagger:dagger-compiler:2.7"