没有可用于离线模式的缓存版本 [英] no cached version available for offline mode

查看:38
本文介绍了没有可用于离线模式的缓存版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在办公室,我在代理后面.互联网访问受到限制.

At office, I am behind a proxy. The internet access is restricted.

因此,我在家中执行了 gradle 同步,并将 C:\Users\username.gradle 中的文件夹.gradle"从我的家用 PC 复制到我办公室 PC 上的同一位置.

So I performed a gradle sync at home and copied the folder ".gradle" present at C:\Users\username.gradle from my home PC to the same location on my office PC.

现在在我的办公室 PC 上,我将 Android Studio 中的 gradle 设置为离线工作",但每当我尝试执行 gradle 同步时,我都会收到一条错误消息

Now on my office PC, I set gradle in Android Studio to "Work Offline" but still whenever I try to perform a gradle sync, I get an error stating

Error: Could not download google-services.jar (com.google.gms:google-services:3.0.0): No cached version available for offline mode

但是在挖掘.gradle"文件夹时,我能够在

However on digging through the ".gradle" folder I was able to locate the google-service.jar file at

C:\Users\username\.gradle\caches\modules-2\files-2.1\com.google.gms\google-services\3.0.0\32b833222c886ecfb37d79b1a05ce1eddb702db1

我不确定如何继续.请帮忙.

I am not sure how to proceed. Please help.

推荐答案

我在 2019.2 版本中为此挖了很久.此选项已在 UI 中移动.它现在位于 gradle 工具的工具栏中:

I had to dig for this a long time in the 2019.2 version. This option has moved in the UI. It is now in the toolbar of the gradle tools:

请参阅 https://www.jetbrains 上的 JetBrains 文档.com/help/idea/jetgradle-tool-window.html#offline

这篇关于没有可用于离线模式的缓存版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆