原因:打开 zip 文件时出错(android-studio) [英] Cause: error in opening zip file (android-studio)

查看:47
本文介绍了原因:打开 zip 文件时出错(android-studio)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我创建一个新项目时,我完成了这些步骤并单击完成"并等待项目打开.但是我看到了一个错误:

When I create a new project I finish the steps and click on "finish" and wait for the project to open. But instead I see an error:

我无法解决这个问题.

推荐答案

我的安装 &问题详情

我在使用 File > 将 github 项目导入 Android Studio 后遇到了这个问题.导入项目 选项.网络很好,我有其他 Android Studio 项目正常工作,所以这不是安装问题.我运行 Android Studio (Preview) 0.5.4

My Installation & problem details

I had this issue after importing a github project into Android Studio using the File > Import Project option. Network was fine and I had other Android Studio projects working properly so this was not a installation issue. I run Android Studio (Preview) 0.5.4

我有幸将差异与工作项目进行比较.这就是我发现错误是由 gradle/wrapper/gradle-wrapper.properties 文件中的 distributionUrl 属性引起的.

I had the luxury of comparing differences with working projects. That is how I discovered the error was due to the distributionUrl property in the gradle/wrapper/gradle-wrapper.properties file.

在失败的项目中,这被设置为 distributionUrl=http\://services.gradle.org/distributions/gradle-1.10-all.zip.在工作项目中,这是 distributionUrl=http\://services.gradle.org/distributions/gradle-1.11-all.zip.注意版本的不同.

In the failing project this was set like distributionUrl=http\://services.gradle.org/distributions/gradle-1.10-all.zip. While in the working project this was distributionUrl=http\://services.gradle.org/distributions/gradle-1.11-all.zip. Note the difference in the version.

将 gradle-wrapper.properties 中的此 distributionUrl 更新到此 1.11 链接为我解决了该问题.

Updating this distributionUrl in gradle-wrapper.properties to this 1.11 link solved the issue for me.

我在一个非常受限的网络上遇到了这个问题,我可以看到 gradle-1.10 链接确实指向一个 zip 文件.网络问题听起来很有道理.可能我已经在另一个网络上下载了 1.11 zip.我不太可能(尽管并非不可能)1.10 zip 损坏.

I have this issue on a very restricted network and I can see that the gradle-1.10 link does point to a zip file. The network issue sounds very plausible to. Probably I already have the 1.11 zip downloaded while on another network. I's less likely (though not impossible) that the 1.10 zip is broken.

这篇关于原因:打开 zip 文件时出错(android-studio)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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