dangalg
dangalg

Reputation: 6486

can't add realm to android studio

I added:

compile 'io.realm:realm-android:0.72.0' 

to my dependencies

then I am getting this error: Error:Failed to find: io.realm:realm-android:0.72.0 Open File
Open in Project Structure dialog

Upvotes: 0

Views: 1807

Answers (2)

Shubhamhackz
Shubhamhackz

Reputation: 7973

Step 1: Add the class path dependency to the project level build.gradle file.

buildscript {
repositories {
    jcenter()
}
dependencies {
    classpath "io.realm:realm-gradle-plugin:4.1.0"
}

}

step 2: apply plugin: 'realm-android'

step 3:realm { syncEnabled = true; }

Upvotes: 0

localhost
localhost

Reputation: 5598

Probably you are missing

repositories {
   jcenter()
}

in your gradle.build.

Upvotes: 4

Related Questions