Kapt converting public fields to private during compilation

#1

With Dagger 2.16 and above I am getting an error with Kapt
error: Dagger does not support injection into private fields.
Upon investigation, the field has indeed been translated into a Private field in the Auto Generated Java file, during compilation by kapt
Has anyone seen this error, is there a fix available?

#2

Adding @JvmField to the property should fix that.

It’s not kapt by the way, properties in kotlin become a private field plus getter and setter in Java.