我是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.produce(RemoteExternalSystemProjectResolverImpl.java:37)com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl.resolveProjectInfo(RemoteExternalSystemProjectResolver)上的com.intellij.openapi.externalSystem.service.remote.AbstractRemoteExternalSystemService.execute(AbstractRemoteExternalSystemService.java:59) .intellij.openapi.externalSystem.service.remote.wrapper.ExternalSystemProjectResolverWrapper.resolveProjectInfo(ExternalSystemProjectResolverWrapper.java:49)位于com.intellij.openapi.externalSystem.service.internal.ExternalSystemResolveProjectTask.doExecute(ExternalSystemResolveProjectTask.java:48) .openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:137)位于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 $ 2.run(ProgressManagerImpl.java:178)上的com.intellij.openapi.progress.impl.ProgressManagerImpl $ TaskRunnable.run(ProgressManagerImpl.java:464) com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)上的.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)在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。在java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:511)在java.util.concurrent.FutureTask.run(FutureTask.java:266)在impl.ApplicationImpl $ 8.run(ApplicationImpl.java:419)在位于java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:617)的java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)位于java.lang.Thread.run(Thread.java:745)在com.intellij.openapi.application.impl.ApplicationImpl $ 1 $ 1.run(ApplicationImpl.java:149)在com.intellij.openapi.application.impl.ApplicationImpl $ 1 $ 1.run(ApplicationImpl.java:149)中运行(Thread.java:745)在com.intellij.openapi.application.impl.ApplicationImpl $ 1 $ 1.run(ApplicationImpl.java:149)中运行(Thread.java:745)
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
主目录和项目的根目录中的目录,然后再次尝试构建。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句