gradle fail to open zip的问题

项目修改了build.gradle和gradle-wrapper文件,导致出现该问题。

解决方式是,转载自stackoverflow

Step1: Close android studio

Step2: Go to C:\Users\Khurshid\.gradle\wrapper\dists\gradle-1.12-all\2apkk7d25miauqf1pdjp1bm0uo (if you want to configure gradle 1.12)

Step3: try to open the gradle-1.12-all.zip by double clicking it. If it gives error message then delete the zip file.

step4: go to https://services.gradle.org/distributions and download gradle-1.12-all.zip (54mb approx) and copy the same to the folder where you have previously deleted the zip file.

step5: open android studio and go to file->setting select 'gradle' and click on 'use local gradle distribution' and set 'gradle home' to 'C:\Users\Khurshid\.gradle\wrapper\dists\gradle-1.12-all\2apkk7d25miauqf1pdjp1bm0uo\gradle-1.12-all.zip' and click ok.

step6: It will download some file over the internet. If download doesn't start automatically then restart android studio.

step7: Be patience and let it download some important stuff and after that everything should be working fine. This method will help you save your internet data. Downloading the entire gradle directory will consume double the data.

Thank You

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容