Closed Sara-Tareq closed 4 years ago
Hi @Sara-Tareq Are you still having issues. It sounds like the annotation processor isn't running for some reason. If you can provide a sample project that demonstrate the issue, we can investigate.
Not sure, but this might be related with this issue. When I tried to use Realm in multiplatform project i receive this gradle message for plugin version 5.14.0
Kotlin Multiplatform Projects are an experimental feature. app: 'annotationProcessor' dependencies won't be recognized as kapt annotation processors. Please change the configuration name to 'kapt' for these artifacts: 'io.realm:realm-annotations-processor:5.14.0', 'io.realm:realm-annotations-processor:5.14.0'.
When I switch to 6.1.0 or 7.0.0 I receive
Configuration with name 'kapt' not found.
Have you tried to
apply plugin: 'kotlin-kapt'
before the applying the realm-android
plugin?
Closing due to inactivity. Feel free to reopen if this is still an issue or you can provide more info on how to reproduce.
I came across this same issue yesterday. My class was as the following:
open class UnfinishedUserInterfaceFlow @JvmOverloads constructor(
var data: RealmObject? = null,
var flowTypeString: String = "",
@PrimaryKey var id: Long = 0): RealmObject() {
val flowType : FlowType
get() {
return try {
FlowType.valueOf(flowTypeString)
} catch (e: IllegalArgumentException) {
FlowType.ActivateBasal
}
}
}
I guess you can't possibly use a RealmObject
as your type and you need to have a subclass of a RealmObject according to
here. Just writing this for newbies like me
I have a kotlin multiplatform library project where I'm using realm in the androidMain part of it , now I'm facing an issue and can't seem to find a solution for it . I have a class called CacheEntry which extends RealmObject
I also added a RealmModule class since it's a library project
when building I'm getting the error :