android cannot find realm gradle dependency -


i error while building:

failed sync gradle project 'myapp' error:could not find io.realm:realm-android:0.88.3. required by:     myapp:app:unspecified  search in build.gradle files 

in project level gradle have added as:

classpath "io.realm:realm-gradle-plugin:0.88.3" 

in module level:

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

how fix error?

project level gradle:

buildscript {     repositories {         jcenter()     }     dependencies {         classpath 'com.android.tools.build:gradle:2.0.0'         classpath 'io.realm:realm-gradle-plugin:0.88.3'     } } 

module level:

apply plugin: 'com.android.application' apply from: '../config/quality/quality.gradle' apply plugin: 'realm-android'  android {     compilesdkversion 23     buildtoolsversion "23.0.3"      defaultconfig {         applicationid "xxxxx"         minsdkversion 15         targetsdkversion 23         versioncode 1         versionname "1.0"          testinstrumentationrunner "android.support.test.runner.androidjunitrunner"         multidexenabled true     }      buildtypes {         debug {             applicationidsuffix ".debug"             versionnamesuffix "-debug"             debuggable true         }         release {             minifyenabled true             debuggable false             proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro'         }     }      repositories {         jcenter()         maven { url "https://jitpack.io" }     } }    dependencies {     compile 'io.realm:realm-android:0.88.3'     //more dependencies here } 

from 0.88 onwards realm plugin, not compile dependency, need apply plugin realm-android instead. described here: https://realm.io/docs/java/latest/#installation

top level build file

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

app level build file

apply plugin: 'realm-android' 

in case, your should remove:

dependencies {     compile 'io.realm:realm-android:0.88.3' } 

Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -