Android Studio 2.3.1;依赖项和同步项目 [英] Android Studio 2.3.1 ; dependencies and sync project

查看:418
本文介绍了Android Studio 2.3.1;依赖项和同步项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了全新的android studio,发现了一个问题消息
无法打开Zip文件
Gradle s依赖....
重新下载依赖关系和同步项目(需要网络)
i don
t知道该做什么
感谢您的帮助

解决方案

引发:java.util.zip.ZipException:打开zip文件时出错



这意味着Gradle下载的文件由于某种原因或某种原因而被破坏,这可能是Gradle本身(包装器会下载)的下载或Gradle下载的用于运行构建的任何依赖项。

p>

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



为此,请删除主目录和项目根目录中的.gradle目录目录并再次尝试编译。



在gradle的窗口主目录中是

  C:\ Users \User\.gradle 

在Mac OSX主目录中



  /Users/User_name/.gradle 


I installed the all new android studio and found a problem message "Failed To Open Zip File Gradles depencies .... Re-download depencies and sync project (requires network) i dont know what to do thank you for helping

解决方案

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 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.

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

In window home directory of gradle is

C:\Users\User\.gradle

In Mac OSX home directory

/Users/User_name/.gradle

这篇关于Android Studio 2.3.1;依赖项和同步项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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