Gradle同步失败:连接超时:有关更多详细信息,请查阅IDE日志 [英] Gradle sync failed: connection time out: consult IDE log for more details

查看:129
本文介绍了Gradle同步失败:连接超时:有关更多详细信息,请查阅IDE日志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚安装了Android Studio 2.3.1,但是启动后告诉我成绩同步失败:连接超时:连接请查阅IDE日志以获取更多详细信息".请我不知道该怎么办.

I just installed Android studio 2.3.1, but after starting it is telling me "Grade sync failed: connection time out: connect consult IDE log for more details". Pls I don't know what to do.

推荐答案

原因:java.util.zip.ZipException:打开zip文件时出错 这意味着Gradle下载的文件由于某种原因被损坏.这可能是Gradle本身的下载(包装程序所做的),也可能是Gradle为运行您的构建而下载的任何依赖项.

Caused by: java.util.zip.ZipException: error in opening zip file This mean that a file that Gradle has downloaded has become corrupted due to somehow or some reason. This might be the download of Gradle itself (which the wrapper does) or any dependency that Gradle has downloaded to run your build.

Gradle不会尝试检测或解决问题,因此您需要手动修复它.解决方案通常是清除Gradle的下载缓存,并让它获取所需内容的新副本.

Gradle doesn't attempt to detect or resolve the problem, so you need to fix it manually. The solution is often to purge Gradle's download caches and let it get fresh copies of what it needs.

为此,请同时删除主目录和项目根目录中的.gradle目录,然后尝试重新构建.

To do that, delete the .gradle directories in both your home directory and in your project's root directory and try building again.

在gradle的窗口主目录中是

In window home directory of gradle is

C:\ Users \ User.gradle 在Mac OSX主目录中

C:\Users\User.gradle In Mac OSX home directory

/Users/User_name/.gradle

/Users/User_name/.gradle

这篇关于Gradle同步失败:连接超时:有关更多详细信息,请查阅IDE日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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