Hi all,
I am quite new to Kotlin and I am learning as I program an android App. I am using room persistence library in Android and while doing so I get the following error when I hover over entitties in @Database
Type mismatch
Required: Array<(KClass … KClass<*>)>
Found: () → KClass
Relevant code here:
@Database(entities = {Restaurants::class}, version = 1)
abstract class AppDatabase : RoomDatabase {
…
}
@Entity(tableName = “restaurants”)
class Restaurants {
@PrimaryKey(autoGenerate = true)
private val UID : Int = 0
…
}
Can someone please help me ? I read through the reflections document and I am still not able to understand this error properly.
Cheers … Nirmal