Gradle同步失败的Android Studio 3.6 [英] Gradle Sync Failed Android Studio 3.6

查看:772
本文介绍了Gradle同步失败的Android Studio 3.6的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚将Android Studio从3.5.3更新到了3.6.进行此更新后,我还更新了Gradle和Android SDK生成工具.现在,Gradle同步因以下错误而失败:

I have just updated the Android Studio from 3.5.3 to 3.6. After this update, I have updated the Gradle and Android SDK Build Tools as well. Now the Gradle sync is failing with these errors:

1. org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException:
    Could not resolve all artifacts for configuration ':classpath'.
 2. org.gradle.internal.resolve.ModuleVersionResolveException: Could not
    resolve com.android.tools.build:gradle:3.6.0.
 3. org.gradle.internal.resolve.ModuleVersionResolveException: No cached
    version of com.android.tools.build:gradle:3.6.0 available for
    offline mode.

看着第三个错误,似乎需要在Android Studio 设置->构建,执行,部署-> Gradle 中禁用离线工作选项.但是在上述设置中找不到离线工作复选框. 这是实际问题吗?如果是,那么如何在 Android Studio 3.6 中将其禁用?如果没有,那么这里出了什么问题?

Looking at the 3rd error it seems that Offline Work option needs to be disabled in Android Studio Settings -> Build, Execution, Deployment -> Gradle. But the Offline Work check box is no where to be found in the said settings. Is it the actual problem? If yes, then how it could be disabled in Android Studio 3.6? If no, then what is the problem here?

我已经尝试过使缓存无效/重新启动,但没有帮助.

I have already tried Invalidate Caches / Restart but it did not help.

推荐答案

前一段时间,运行到同样的错误.这对我有用.

Run to the very same error a while ago. This worked for me.

来自Android Studio 3.6的新功能博客文章:切换Gradle离线模式的新位置要启用或禁用Gradle的离线模式,请首先从菜单栏中选择视图">工具窗口">"Gradle".然后,在Gradle窗口顶部附近,单击Gradle面板中的Toggle脱机模式Gradle脱机按钮

来源:无法在Android上启用Gradle的离线模式Studio 3.6

这篇关于Gradle同步失败的Android Studio 3.6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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