Andriod Gradle同步失败 [英] Andriod Gradle Sync failed
问题描述
由以下原因引起:org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration $ ArtifactResolveException:无法解析配置':classpath'的所有工件.
Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all artifacts for configuration ':classpath'.
原因:org.gradle.internal.resolve.ModuleVersionResolveException:无法解析com.android.tools.build:gradle:3.6.1.
Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve com.android.tools.build:gradle:3.6.1.
原因:org.gradle.internal.resolve.ModuleVersionResolveException:脱机模式下没有com.android.tools.build:gradle:3.6.1的缓存版本.
Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: No cached version of com.android.tools.build:gradle:3.6.1 available for offline mode.
推荐答案
这是在新的Android Studio 3.6更新中发现的问题.但这基本上不是问题.
所有您需要做的是以下操作:
要启用或禁用Gradle的离线模式,请首先从菜单栏中选择视图">工具窗口">"Gradle".然后,在"Gradle"窗口顶部附近,单击切换脱机模式"
It is a problem found in the new Android Studio 3.6 update. But it is basically not a problem.
All you have to do is the following:
To enable or disable Gradle's offline mode, first select View > Tool Windows > Gradle from the menu bar. Then, near the top of the Gradle window, click Toggle Offline Mode
以下是一些屏幕截图:
Here are some screenshots:
这篇关于Andriod Gradle同步失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!