没有可用于离线模式的 com.google.gms:google-services

时间:2023-02-12
本文介绍了没有可用于离线模式的 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.

推荐答案

离线模式不允许你完全离线工作.它实际上是一种良好的缓存模式.每当您添加新的依赖项时,您HAVE 可以同步项目,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.

更新
如果您在代理网络后面工作,请转到 File-> Settings -> Under Appearence &行为 -> 在系统设置下 -> 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 的缓存版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

上一篇:程序类型已存在:android.support.v4.media.MediaBrowserCo 下一篇:android - 任务':app:compileDebugJavaWithJavac'的执行

相关文章

最新文章