My question is similar to this.
So for instance, I have a LiveData
implementation:
public class CustomLiveData extends LiveData
Your Dagger hierarchy looks like this:
appcomponent
-> activitycomponent
You try to inject activity context
inside view, that depends on appcomponent
directly.
It's not possible since there is no method that could provide activity context in appcomponent
. Instead, inside view, you should retrieve activity (for example using getContext
), extract activitycomponent
from it and only then inject CustomLiveData
.