Watch keynotes and sessions from, our virtual developer conference.

[Android] App initialization throws an error

I have installed Realm on new android project and import realm as follow:

import io.realm.Realm

I’m still not able to initialize the app. App is throwing an error
Am I missing something

val app: App = App(AppConfiguration.Builder(appID).build())

However, I can still do Realm.init(this) without error

PS: I tried importing import io.realm.mongodb.App but MongoDB import is throwing an error saying Unresolved reference: mongodb

@Safik_Momin What version are you using? You should be able to clone the tutorial repo, build, and run - I just tested it out and it works for me.

Thank you for the update @Ian_Ward. It looks like realm android documentation doesn’t mention to add implementation "io.realm:android-adapters:4.0.0" in the dependencies section. This fixes the above problem for me.