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

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

问题描述

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

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"文件夹时,我能够在以下位置找到google-service.jar文件

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版本中对此进行了长时间的挖掘.此选项已在用户界面中移动.现在位于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天全站免登陆