I am trying to get Realm to work in my project. I have Kotlin with version 1.2.51 and Instant Run disabled.
In my project build.gradle
file I added the
Seems to be a bug in the Realm-Transformer 5.4.0, which happens only if experimental = true
is enabled for Kotlin Android Extensions.
EDIT: Using 5.4.1+ should solve this problem.
PREVIOUS ANSWER: You can use manually defined versions in the build.gradle file in the meantime:
buildscript {
ext.kotlin_version = '1.2.51'
ext.realm_version = '5.4.0'
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath "io.realm:realm-transformer:5.1.0"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
import io.realm.transformer.RealmTransformer
android.registerTransform(new RealmTransformer(project))
dependencies {
implementation "io.realm:realm-annotations:$realm_version"
implementation "io.realm:realm-android-library:$realm_version"
implementation "io.realm:realm-android-kotlin-extensions:$realm_version" {
exclude group: "org.jetbrains.kotlin", module: "kotlin-stdlib-jdk7"
}
kapt "io.realm:realm-annotations-processor:$realm_version"
}
As per docs.