Android的工作室 - 在打开ZIP文件错误 - 无法完成摇篮执行 [英] Android studio - Failed to complete gradle execution - error in opening zip file

查看:994
本文介绍了Android的工作室 - 在打开ZIP文件错误 - 无法完成摇篮执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新的android开发和android Studio IDE中。

I'm new to android development and android studio IDE.

我已经签出到位桶从一个项目,当我尝试编译我收到以下错误:

I've checked-out a project from bitbucket and when I try to compile it I get the following error:

要完成摇篮执行失败

原因:   在打开压缩文件错误。

Cause: error in opening zip file.

我的 gradle-wrapper.properties 如下:

distributionBase = GRADLE_USER_HOME
  distributionPath =包装/ dists中
  zipStoreBase = GRADLE_USER_HOME
  zipStorePath =包装/ dists中
  distributionUrl = HTTP \://services.gradle.org/distributions/gradle-1.11-all.zip

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.11-all.zip

我是不是能够从该得到太多信息,但完整的日志状态:

I wasn't able to get too much information from this but the full log states:

2014年5月23日14:06:28950 [32077] WARN -   nal.AbstractEx​​ternalSystemTask - 原因:错误开幕zip文件   com.intellij.openapi.externalSystem.model.ExternalSystemException:   原因:错误开幕zip文件的   org.jetbrains.plugins.gradle.service.project.GradleExecutionHelper.execute(GradleExecutionHelper.java:206)     在   org.jetbrains.plugins.gradle.service.project.GradleProjectResolver.resolveProjectInfo(GradleProjectResolver.java:116)     在   org.jetbrains.plugins.gradle.service.project.GradleProjectResolver.resolveProjectInfo(GradleProjectResolver.java:64)     在   com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl$1.produce(RemoteExternalSystemProjectResolverImpl.java:41)     在   com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl$1.produce(RemoteExternalSystemProjectResolverImpl.java:37)     在   com.intellij.openapi.externalSystem.service.remote.AbstractRemoteExternalSystemService.execute(AbstractRemoteExternalSystemService.java:59)     在   com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl.resolveProjectInfo(RemoteExternalSystemProjectResolverImpl.java:37)     在   com.intellij.openapi.externalSystem.service.remote.wrapper.ExternalSystemProjectResolverWrapper.resolveProjectInfo(ExternalSystemProjectResolverWrapper.java:49)     在   com.intellij.openapi.externalSystem.service.internal.ExternalSystemResolveProjectTask.doExecute(ExternalSystemResolveProjectTask.java:48)     在   com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:137)     在   com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:123)     在   com.intellij.openapi.externalSystem.util.ExternalSystemUtil $ 3.execute(ExternalSystemUtil.java:467)     在   com.intellij.openapi.externalSystem.util.ExternalSystemUtil $ 4 $ 2.运行(ExternalSystemUtil.java:546)     在   com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:464)     在   com.intellij.openapi.progress.impl.ProgressManagerImpl $ 2.运行(ProgressManagerImpl.java:178)     在   com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)     在   com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)     在   com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:171)     在   com.intellij.openapi.progress.impl.ProgressManagerImpl $ 8.run(ProgressManagerImpl.java:373)     在   com.intellij.openapi.application.impl.ApplicationImpl $ 8.run(ApplicationImpl.java:419)     在   java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:511)     在java.util.concurrent.FutureTask.run(FutureTask.java:266)在   java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)     在   java.util.concurrent.ThreadPoolExecutor中的$ Worker.run(ThreadPoolExecutor.java:617)     在java.lang.Thread.run(Thread.java:745)在   com.intellij.openapi.application.impl.ApplicationImpl $ 1 $ 1.运行(ApplicationImpl.java:149)

2014-05-23 14:06:28,950 [ 32077] WARN - nal.AbstractExternalSystemTask - Cause: error in opening zip file com.intellij.openapi.externalSystem.model.ExternalSystemException: Cause: error in opening zip file at org.jetbrains.plugins.gradle.service.project.GradleExecutionHelper.execute(GradleExecutionHelper.java:206) at org.jetbrains.plugins.gradle.service.project.GradleProjectResolver.resolveProjectInfo(GradleProjectResolver.java:116) at org.jetbrains.plugins.gradle.service.project.GradleProjectResolver.resolveProjectInfo(GradleProjectResolver.java:64) at com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl$1.produce(RemoteExternalSystemProjectResolverImpl.java:41) at com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl$1.produce(RemoteExternalSystemProjectResolverImpl.java:37) at com.intellij.openapi.externalSystem.service.remote.AbstractRemoteExternalSystemService.execute(AbstractRemoteExternalSystemService.java:59) at com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl.resolveProjectInfo(RemoteExternalSystemProjectResolverImpl.java:37) at com.intellij.openapi.externalSystem.service.remote.wrapper.ExternalSystemProjectResolverWrapper.resolveProjectInfo(ExternalSystemProjectResolverWrapper.java:49) at com.intellij.openapi.externalSystem.service.internal.ExternalSystemResolveProjectTask.doExecute(ExternalSystemResolveProjectTask.java:48) at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:137) at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:123) at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$3.execute(ExternalSystemUtil.java:467) at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$4$2.run(ExternalSystemUtil.java:546) at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:464) at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178) at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212) at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:171) at com.intellij.openapi.progress.impl.ProgressManagerImpl$8.run(ProgressManagerImpl.java:373) at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:419) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:149)

2014年5月23日14:06:28950 [32077] WARN -   .project.GradleProjectImporter - 2014年5月23日14:06:28951 [32078]
  INFO - .project.GradleProjectImporter - 原因:错误打开ZIP   文件

2014-05-23 14:06:28,950 [ 32077] WARN - .project.GradleProjectImporter - 2014-05-23 14:06:28,951 [ 32078]
INFO - .project.GradleProjectImporter - Cause: error in opening zip file

我使用的是Android 0.5.2工作室

I'm using Android studio 0.5.2.

有人点我在正确的方向上如何解决此问题?

Can someone point me in the right direction on how to solve this?

推荐答案

这是错误打开压缩文件往往指的摇篮已下载有时会损坏的文件 - 这可能是摇篮本身的下载(该封装器),或者摇篮已下载的依赖,以运行构建。

An "error in opening zip file" tends to mean that a file that Gradle has downloaded has somehow become corrupted -- this might be the download of Gradle itself (which the wrapper does), or a dependency that Gradle has downloaded to run your build.

摇篮不会尝试检测或解决的问题,所以你需要手工修复。解决的办法是经常清除摇篮的下载缓存,让它得到它所需要新鲜的副本。要做到这一点,删除这两个你的主目录,并在项目的根目录下的 .gradle 目录,然后重试建设。

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.

这篇关于Android的工作室 - 在打开ZIP文件错误 - 无法完成摇篮执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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