Can I reference Java interface fields from Kotlin? I have this Java interface:
public interface BaseColumns {
public static final String _ID = \"_id\";
In Kotlin, unlike Java, static members of interfaces are not derived and cannot be called in subclasses without qualifying the interface name.
You should reference _ID
through BaseColumns
: BaseColumns._ID
will work.
This seems to be different for classes: non-qualified name of a base class static member resolves to it, but the member is still not inherited.