I am trying to integrate Room database in my app. Compilation works fine but while I click the run button, I get No cached version of android.arch.persistence.room:compiler:1.1.0 available for offline mode error. I googled and found some solutions like unchecking offline option in gradle setting and removing --offline command from compiler settings. Nothing works. In my android studio the offline option in gradle setting was unchecked by default. I am not working behind a proxy network.
Here is my gradle dependencies section.
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
...
...
def room_version = "1.1.0" // or, for latest rc, use "1.1.1-rc1"
implementation "android.arch.persistence.room:runtime:$room_version"
annotationProcessor "android.arch.persistence.room:compiler:$room_version"
}
My project level gradle file
// Top-level build file where you can add configuration options common to all
sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}