android-studiodependency-injectionandroid-gradle-plugingradle-dependencies

Implementing Realm Database in Android Studio 2024


I am reaching out to you all as I am having some problem when I am implementing the Realm Database in my Android Studio Jellyfish | 2023.3.1.

So, I am used to implmenting the dependencies, plugins ... with the old version, but now Android Studio have a new way of implementing the dependencies.

for me, i have just do FILE> PROJECT STRUCTURE> DEPENDENCIES> + "ADD DEPENDENCIES"> OK> APPLY to add dependencies. IMAGE

BUT then, i found out that i can't use it: IMAGE-2

I am quite upset when I have taking hours to search on how to implement the Realm database using the new method as no one ask about this question, even chatGPT give me the wrong things.

P.S: I am sorry for the stupid question that I have made if it is :(

Do you guys know how to implement the Realm database correctly? Thanks for your helping hand!


Solution

  • I used the same way to implement Realm DB. But putting io.realm.kotlin:library-base into the window worked for me. Realm Dependency Image

    Or you cold just go to the actual documentation website since it will be more intuitive.

    https://www.mongodb.com/docs/atlas/device-sdks/sdk/kotlin/install/#std-label-kotlin-install-android