没有缓存版本的 com.google.gms:google-services:1.x.x 可用于离线模式 [英] No cached version of com.google.gms:google-services:1.x.x available for offline mode

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

问题描述

错误:没有缓存版本的 com.google.gms:google-services:1.4.0-beta3 可用于离线模式.禁用 Gradle 的离线模式"并同步项目

Error:No cached version of com.google.gms:google-services:1.4.0-beta3 available for offline mode. Disable Gradle 'offline mode' and sync project

我面临这个问题是因为我在 android studio 中以离线模式工作.有人可以告诉我这个缓存文件存储在我的 Windows 中的什么位置,我将从哪里获取这个文件,以便我可以单独下载并粘贴/保留它,并构建我的 android 项目.

I am facing this issue because I am working in offline mode in android studio. Can some body please tell me where is this cached file stored in my windows and from where I'll get this file so that I can separately download it and paste/keep it, and build my android project.

推荐答案

离线模式不允许您完全离线工作.它实际上是一种良好的缓存模式.每当您添加新的依赖项时,您必须 对项目进行 gradle 同步,至少一次.Android Studio 必须下载(然后缓存)应用程序的依赖项才能工作.一旦你同步了 gradle 文件,那么你就可以切换到离线模式,你就可以工作了.

The Offline mode does not allow you to completely work offline. Its actually a GOOD cache mode. Whenever you add new dependencies, You HAVE to gradle sync the project, ATLEAST ONCE. Android studio has to download(then cache) the dependencies for the app to work. Once you sync the gradle files, then you can switch to offline mode, and you can work.

如果您必须离线工作,那么我建议您确定应用程序中所需的所有依赖项.一次添加它们,Gradle 同步.然后切换到离线模式.

If you must work offline, then i would suggest determining all the dependencies you need in your application. Add them all at once and Gradle sync. Then switch to Offline mode.

更新
如果您在代理网络后面工作,请转至文件-> 设置-> 在外观& 下行为 -> 在系统设置下 -> HTTP 代理 -> 单击手动代理配置,并添加必要的详细信息.然后转到您的 gradle.properties 文件,其中应包含如下内容:

UPDATE
If you are working behind a proxy network, then goto File-> Settings -> Under Appearence & Behavior -> Under System Settings -> HTTP Proxy -> Click on Manual proxy configuration, and add the neccessary details. Then goto your gradle.properties file which should contain sometyhing like this :

systemProp.http.proxyPassword=your_password
systemProp.http.proxyHost=host_Ip_address
systemProp.http.proxyUser=your_username
systemProp.http.proxyPort=port_number

将其与上述内容一起添加到您的文件中:

Add this to your file, along with the above :

systemProp.https.proxyPassword=your_password
systemProp.https.proxyHost=host_Ip_address
systemProp.https.proxyUser=your_username
systemProp.https.proxyPort=port_number

这些详细信息可以从浏览器的代理设置中找到.

These details can be found out from your browser's proxy settings.

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

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