gpt4 book ai didi

android - 任务 mockableAndroidJar 执行失败

转载 作者:行者123 更新时间:2023-11-29 01:25:01 28 4
gpt4 key购买 nike

当我尝试构建应用程序时出现此异常:

Execution failed for task ':app:mockableAndroidJar'.
> java.io.EOFException: Unexpected end of ZLIB input stream

这是 stactrace 的 fragment :

Caused by: org.gradle.api.UncheckedIOException: java.io.EOFException: Unexpected end of ZLIB input stream
at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:43)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:78)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:226)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:219)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:208)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:589)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:572)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
... 49 more
Caused by: java.io.EOFException: Unexpected end of ZLIB input stream
at org.objectweb.asm.ClassReader.a(Unknown Source)
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at com.android.builder.testing.MockableJarGenerator.rewriteClass(MockableJarGenerator.java:126)
at com.android.builder.testing.MockableJarGenerator.createMockableJar(MockableJarGenerator.java:91)
at com.android.build.gradle.internal.tasks.MockableAndroidJarTask.createMockableJar(MockableAndroidJarTask.java:51)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)

配置:com.android.tools.build:gradle:1.3.0buildToolsVersion 23.0.2gradle 2.4

无法弄清楚发生了什么问题。它曾经工作并且配置多年来没有改变。请帮忙。

最佳答案

您可以尝试取消选中里面的 test artifacts 选项:

Preferences -> Build, Execution, Deployment -> Gradle -> Experimental -> Enable all test artifacts in Android projects

关于android - 任务 mockableAndroidJar 执行失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34536967/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com