I saw this stackoverflow post display how to use constructor injection to replace field injection, unfortunately, I am injecting to the test so neither class nor method I can add arguments. Any workaround?
Some other possibilities ( I am on my phone so I can’t test them for you):
You didn’t say if this was dagger 1 or 2, but dagger 2 supports method injection so you can say @set:Inject to annotate the setter method instead of the field.
There is also @JvmField to make the field public to Java.