I have the following override of method on hashCode in AbstractORM class:
var _id = Random().nextLong()
override fun getId() = _id
I've encountered the same issue and the solution for me is to assign both compileOptions and kotlinOptions in build.gradle to version 1.8
android {
...
// Configure only for each module that uses Java 8
// language features (either in its source code or
// through dependencies).
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
// For Kotlin projects
kotlinOptions {
jvmTarget = "1.8"
}
}
Referenced from Use Java 8 language features of Android Developers official website.