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

查看:165
本文介绍了没有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.

推荐答案

脱机模式不允许您完全脱机工作.实际上是 GOOD缓存模式.每当您添加新的依赖项时,您必须即可逐步同步项目 ATLEAST ONCE . 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天全站免登陆