简体   繁体   English

为什么 Android Studio 一次又一次地显示 ERROR: Failed to open zip file。 即使我正在创建一个新项目?

[英]Why Android Studio again and again show ERROR: Failed to open zip file. even when i am crating a new project?

Before Updating my Android Studio it was working fine but before 2 days I had updated my studio then the problem is started.在更新我的 Android Studio 之前,它工作正常,但在我更新我的工作室之前 2 天,问题就开始了。

UPDATE FROM VERSION 3.1 to 3.3从版本 3.1 更新到 3.3

Now, It is giving me this error现在,它给了我这个错误

ERROR: Failed to open zip file.
Gradle's dependency cache may be corrupt (this sometimes occurs after a 
network connection timeout.)
Re-download dependencies and sync project (requires network)
Re-download dependencies and sync project (requires network)

It shows me error all the time when i trying to open the project in studio evenly on making new projects or importing my old projects当我尝试在工作室中均匀地打开项目以制作新项目或导入我的旧项目时,它一直向我显示错误

My error is solved when i am update my gradle wrapper class...当我更新我的 gradle 包装类时,我的错误解决了...

FROM THIS->从这个->

distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip

To THIS->到这个->

distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-all.zip

How can i solve it permanently for my future projects我如何才能为我未来的项目永久解决它

1) Manually download Gradle 3.3 binary (direct link:https://downloads.gradle.org/distributions/gradle-5.2.1-bin.zip ) 1) 手动下载 Gradle 3.3 二进制文件(直接链接:https ://downloads.gradle.org/distributions/gradle-5.2.1-bin.zip

2) Open your android studio root directory, and extract the zip to the gradle folder (for example in my Debian machine the full path is /opt/android-studio/gradle/gradle-3.3) 2)打开你的android studio根目录,将zip解压到gradle文件夹(例如在我的Debian机器中,完整路径是/opt/android-studio/gradle/gradle-3.3)

3) Open Android Studio, go to File->Settings->Build, Exectution, Deployment->Gradle and set "Gradle home" to point your new gradle-3.3 folder. 3) 打开 Android Studio,转到 File->Settings->Build, Execution, Deployment->Gradle 并将“Gradle home”设置为指向新的 gradle-3.3 文件夹。

4) Sync and you are ready to go! 4)同步,你就可以开始了!

I hope that helps.我希望这有帮助。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误:无法打开文件。 Android Studio 3 - Error: failed to open file. Android Studio 3 Android:读取文件:第一次选择文件时不会打开。 当我再次尝试时,它将打开文件 - Android: Reading a file: Does not open the first time I select the file. When I try it again it opens the file 为什么我尝试在 android studio 中打开新活动时出错 - why am i getting error when trying to open new activity in android studio Android studio:项目刷新失败..打开zip文件时出错 - Android studio: Project refresh failed.. error in opening zip file 如何在Android中再次打开arraylist时显示预选复选框 - How to preselected checkbox show when again arraylist open in android Android Studio打开了不正确的Java类文件。 错误:“链接资源失败。” - Android Studio open incorrect java class file. Error: “Failed linking the resources.” 为什么在 Android Studio 中创建新项目时出现以下错误? - Why am I getting following error while I create a new project in Android studio? Android Studio:为什么我在全新的 Google Maps API 项目上出现多 dex 错误? - Android Studio: Why am i getting multi dex error on brand new Google Maps API project? 为什么我收到 paypal 系统错误请重试 - why am I getting paypal system error please try again 我通过电话删除了我的应用程序,当我尝试通过android studio重新启动它时出现错误 - i deleted my application via phone and when i try to launch it again via android studio it gives an error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM