[英]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.