0

I added glide 4.8.0 library to my android studio project successfully. But when I check gradle offline work and run project I faced with this error:

"No cached version of com.github.bumptech.glide:compiler:4.8.0 available for offline mode". Disable Gradle 'offline mode' and sync project

I want gradle stay in offline work mode. I added glide library to my project like bellow in build.gradle(app level):

    implementation 'com.github.bumptech.glide:glide:4.8.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'

and project level of build.gradle is:

buildscript {

    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.4'


        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        mavenCentral()
        google()
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
Saeid Z
  • 387
  • 3
  • 17
  • Possible duplicate of [No cached version of gradle](https://stackoverflow.com/questions/24144598/no-cached-version-of-gradle) – Martin Zeitler Sep 21 '18 at 08:42
  • also https://stackoverflow.com/questions/28712025/how-to-disable-gradle-offline-mode-in-android-studio – Martin Zeitler Sep 21 '18 at 08:42
  • @Martin Zeitler My question is about glide library not gradle. – Saeid Z Sep 21 '18 at 08:48
  • offline mode is offline mode... no matter which library Gradle is trying to get. when reading "I want gradle stay in offline work mode.", this makes me just wonder, if you may have bothered to read the error message once? you'd have to disable offline mode at least to fetch & cache that library. – Martin Zeitler Sep 21 '18 at 08:52

1 Answers1

1

Have you tried disabling offline mode and then rebuild, after the building is done you then enable your offline mode again.