Relative Content

Tag Archive for androiddependency-injectiondaggerdagger-hilt

How to do field injection in a base class with Hilt in Android

I have this basic scenario where a base class needs to be injected with a Logger class. I am getting kotlin.UninitializedPropertyAccessException: lateinit property logger has not been initialized in the location mentioned below. What am I missing? (note: constructor injection works but want to avoid adding logger to subclass constructors.