Android Studio-无法完成gradle执行-打开zip文件时出错
我是android开发和android studio IDE的新手。
我从bitbucket中签出了一个项目,当我尝试对其进行编译时,出现以下错误:
无法完成Gradle执行
原因:打开zip文件时出错。
我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
我无法从中获得太多信息,但是完整的日志指出:
2014-05-23 14:06:28,950 [32077]警告-nal.AbstractExternalSystemTask-
原因:打开zip文件时出错com.intellij.openapi.externalSystem.model.ExternalSystemException:原因:在org.jetbrains中打开zip文件时出错。
org.jetbrains.plugins.gradle处的plugins.gradle.service.project.GradleExecutionHelper.execute(GradleExecutionHelper.java:206)位于org.jetbrains.plugins.gradle.service.project.GradleProjectResolver.resolveProjectInfo(GradleProjectResolver.java:116)。
service.project.GradleProjectResolver.resolveProjectInfo(GradleProjectResolver.java:64)位于com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl
$
1.produce(RemoteExternalSystemProjectResolverImpl.java:41),位于com.intellij.openapi.externalSystem。
.RemoteExternalSystemProjectResolverImpl $
1。在com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectProject.solveIm.RemoteExternalSystemProjectResolver
com.intellij.openapi.externalSystem.service.remote.wrapper.ExternalSystemProjectResolverWrapper.resolveProjectInfo(ExternalSystemProjectResolverWrapper.java:49)处的com.intellij.openapi.externalSystem.service.internal.ExternalSystemResolveProjectTask.doExecute(java:37)
48)com.intellij.openapi上的com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:137)。com.intellij.openapi.externalSystem.util.ExternalSystemUtil
$
3.execute(ExternalSystemUtil.java:467)处的externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:123)在com.intellij.openapi.externalSystem.util.ExternalSystemUtil
$ 4 $
2.run(ExternalSystemUtil.java:546)在com.intellij.openapi.progress.impl.ProgressManagerImpl
$
TaskRunnable.run(ProgressManagerImpl.java:464)在com.intellij.openapi.progress.impl.ProgressManagerImpl
$ 2.run(
com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)处的com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)处的ProgressManagerImpl.java:178)
.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.run( ApplicationImpl.java:149)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),位于com.intellij.openapi.application.impl的java.lang.Thread.run(Thread.java:745),位于java.util.concurrent.ThreadPoolExecutor
$ Worker.run(ThreadPoolExecutor.java:617)。 ApplicationImpl $ 1 $
1.run(ApplicationImpl.java:149)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),位于com.intellij.openapi.application.impl的java.lang.Thread.run(Thread.java:745),位于java.util.concurrent.ThreadPoolExecutor
$ Worker.run(ThreadPoolExecutor.java:617)。 ApplicationImpl $ 1 $
1.run(ApplicationImpl.java:149)openapi.application.impl.ApplicationImpl $ 1
$ 1.run(ApplicationImpl.java:149)openapi.application.impl.ApplicationImpl $
1 $ 1.run(ApplicationImpl.java:149)
2014-05-23 14:06:28,950 [32077]警告-.project.GradleProjectImporter-2014-05-23
14:06:28,951 [32078]
信息-.project.GradleProjectImporter- 原因:打开zip文件时出错
我正在使用Android Studio 0.5.2。
有人可以为我指出正确的解决方法吗?
回答:
“打开zip文件时出错”往往意味着Gradle下载的文件已以某种方式损坏-
这可能是Gradle本身的下载(包装程序所做的),或者是Gradle下载的依赖项以运行您的构建。
Gradle不会尝试检测或解决问题,因此您需要手动修复它。解决方案通常是清除Gradle的下载缓存,并让其获取所需内容的新副本。为此,请同时删除.gradle
主目录和项目的根目录中的目录,然后再次尝试构建。
以上是 Android Studio-无法完成gradle执行-打开zip文件时出错 的全部内容, 来源链接: utcz.com/qa/415933.html