3

Big problem since upgrading to Android Studio 3.1, I get:

No cached version of com.github.bumptech.glide:compiler:4.6.1 available for offline mode

But I am not in offline mode as you can see here:

enter image description here

I tried Clean Project and Rebuild Project, all with no success. I even rebooted my PC.

Here's my Build.gradle:

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:design:27.1.0'
    implementation 'com.android.support:support-v4:27.1.0'
    implementation 'com.android.support:appcompat-v7:27.1.0'
    implementation "com.android.support:gridlayout-v7:27.1.0"
    implementation 'com.android.support:exifinterface:27.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    implementation 'com.google.code.gson:gson:2.8.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
    implementation 'com.github.bumptech.glide:glide:4.6.1'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.6.1'
}
Zoe
  • 23,712
  • 16
  • 99
  • 132
j3App
  • 1,184
  • 1
  • 11
  • 24

6 Answers6

5

I ran into this issue and "offline work" was unchecked inside gradle settings. After wasting 2 hours on it, I realized that I had --offline in the Command-line options of Build, Execution, Deployment > Compiler. So make sure you don't have that command listed there when you encounter this issue.

Marline
  • 229
  • 3
  • 10
  • Try this answer ➡️ https://stackoverflow.com/questions/60481987/no-cached-version-gradle-plugin-available-for-offline-mode/60500279#60500279 – Mujahid Khan Apr 19 '20 at 07:39
4

You should close Gradle offline-work model and clear compiler Command-line Options --offline:

Clear command line option

Toggle offline Gradle

HMM
  • 29
  • 1
  • 10
Jin Wang
  • 483
  • 4
  • 6
1

Dont know what was going on, maybe it was really due to JCenter being partly down during the day. Probably because half the globe was upgrading Android Studio to 3.1.

I cleaned the cache (70.000 files!), no effect, except from a resulting hourlong download of thousands of files, mainly from JCenter, with at least 10 fails (time outs?) along the way. End result: Gradle still complaing about

No cached version of com.github.bumptech.glide:compiler:4.6.1 available for offline mode

Then in desparation, I modified

annotationProcessor 'com.github.bumptech.glide:compiler:4.6.1'

to

`compile group: 'com.github.bumptech.glide', name: 'compiler', version:` '4.6.1'

in my Build.gradle.

The result was of course an error message.

After then changing back to where I came from

compile group: 'com.github.bumptech.glide', name: 'compiler', version: '4.6.1'

Bingo: all was good, no idea why.

Thanks for your help anyway

j3App
  • 1,184
  • 1
  • 11
  • 24
1

First My English is very poor,Sorry. I meet this problem too,when I upgrade my AndroidStudio to 3.1 and update gradle 3.0.1 to 3.1.0 ,then I build to run my project,it is error “no version of butterknife in offline mode”,but I'm sure it’s not offline mode。I have tried to a lot of ways ,doesn't work. Then I try to add dependences in AndroidStudio ProjectStructure--app--dependences,search and selected the butterknife,and then build to run. It works! https://blog.csdn.net/binglumeng/article/details/79747651 I hope It can help you!

志威梦
  • 126
  • 3
1

The only thing that worked for me was to remove the "--offline" in "File -> Settings -> Compiler -> Command-line Options".

I don't know why this parameter was there but anyway...now it's ok.

AmandaHLA
  • 79
  • 1
  • 2
0

have you tried invalidating your cache and restarting your android studio? or else if your working behind a proxy network checkout this link

Sunny Jain
  • 39
  • 1
  • 3
  • Yes, tried deleting the cache (70k files!). Unfortunately it didn't change the outcome. Thanks anyway – j3App Mar 27 '18 at 20:22