You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a project that is a couple years old, that uses Realm (local database) written in Java for Android.
I recently wanted to add some features, but wanted to update it to use a more current version of Android Studio, etc. In the process, I had some problems, and it seems that the newest version of Realm is the Kotlin version. So I used the Android Studio "tool" to convert the application from Java to Kotlin and tried to compile.
I got everything to compile, except for the accesses to Realm. All Realm keywords are flagged as "Unresolved reference". I suspect that I am not configuring something properly.
Here is the project level build.gradle:
buildscript {
repositories {
gradlePluginPortal()
google()
mavenCentral()
maven { url "https://jitpack.io" }
}
dependencies {
classpath 'com.android.tools.build:gradle:8.8.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.20"
classpath "io.realm.kotlin:io.realm.kotlin.gradle.plugin:3.0.0"
classpath "com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:2.0.1"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
plugins {
id("io.realm.kotlin") version "3.0.0"
}
allprojects {
repositories {
gradlePluginPortal()
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
apply plugin: "io.realm.kotlin"
task clean(type: Delete) {
delete rootProject
}
It's almost as if the Realm "library" is not being included in the build... All of the "red" characters in the image below are "Unresolved references". Any suggestions on what I'm doing wrong?? Thanks!
The text was updated successfully, but these errors were encountered:
I have a project that is a couple years old, that uses Realm (local database) written in Java for Android.
I recently wanted to add some features, but wanted to update it to use a more current version of Android Studio, etc. In the process, I had some problems, and it seems that the newest version of Realm is the Kotlin version. So I used the Android Studio "tool" to convert the application from Java to Kotlin and tried to compile.
I got everything to compile, except for the accesses to Realm. All Realm keywords are flagged as "Unresolved reference". I suspect that I am not configuring something properly.
Here is the project level build.gradle:
and the app build.gradle:
It's almost as if the Realm "library" is not being included in the build... All of the "red" characters in the image below are "Unresolved references". Any suggestions on what I'm doing wrong?? Thanks!
The text was updated successfully, but these errors were encountered: