关于使用android studio gradle 3.1.4和3.2进行构建的确切问题是什么

时间:2018-12-13 07:24:33

标签: java android macos android-studio android-gradle

真的需要帮助

org.gradle.tooling.BuildException: Internal error when trying to read zip file '/Users/pasakornjuipiam/AndroidStudioProjects/MyApplication/app/build/intermediates/res/debug/resources-debug.ap_'.
    at com.android.build.gradle.internal.scope.BuildElements$ExecutorBasedScheduler$transform$2.invoke(BuildElements.kt:133)
    at com.android.build.gradle.internal.scope.BuildElements$ExecutorBasedScheduler$transform$2.invoke(BuildElements.kt:110)
    at kotlin.sequences.SequencesKt___SequencesKt$onEach$1.invoke(_Sequences.kt:1260)
    at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:148)
    at kotlin.sequences.FilteringSequence$iterator$1.calcNext(Sequences.kt:108)
    at kotlin.sequences.FilteringSequence$iterator$1.hasNext(Sequences.kt:132)
    at kotlin.sequences.TransformingSequence$iterator$1.hasNext(Sequences.kt:152)
    at kotlin.sequences.SequencesKt___SequencesKt.toCollection(_Sequences.kt:633)
    at kotlin.sequences.SequencesKt___SequencesKt.toMutableList(_Sequences.kt:663)
    at kotlin.sequences.SequencesKt___SequencesKt.toList(_Sequences.kt:654)
    at com.android.build.gradle.internal.scope.BuildElements$ExecutorBasedScheduler.transform(BuildElements.kt:140)
    at com.android.build.gradle.internal.scope.BuildElements$ExecutorBasedScheduler.into(BuildElements.kt:115)
    at com.android.build.gradle.internal.scope.BuildElementActionScheduler.into(BuildElementActionScheduler.kt:32)
    at com.android.build.gradle.tasks.InstantRunResourcesApkBuilder.doFullTaskAction(InstantRunResourcesApkBuilder.java:163)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
    at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:46)
    at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
    at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:780)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:747)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:121)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:110)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
    at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
    at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:60)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:97)
    at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:87)
    at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
    at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:626)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:581)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: Internal error when trying to read zip file '/Users/pasakornjuipiam/AndroidStudioProjects/MyApplication/app/build/intermediates/res/debug/resources-debug.ap_'.
    at com.android.apkzlib.zip.ZFile.<init>(ZFile.java:528)
    at com.android.apkzlib.zip.ZFile.<init>(ZFile.java:447)
    at com.android.apkzlib.zip.ZFile.<init>(ZFile.java:433)
    at com.android.builder.files.RelativeFiles.fromZip(RelativeFiles.java:119)
    at com.android.builder.files.IncrementalRelativeFileSets.fromZip(IncrementalRelativeFileSets.java:101)
    at com.android.builder.files.IncrementalRelativeFileSets.fromZip(IncrementalRelativeFileSets.java:79)
    at com.android.builder.core.AndroidBuilder.packageCodeSplitApk(AndroidBuilder.java:1443)
    at com.android.build.gradle.tasks.InstantRunResourcesApkBuilder.lambda$doFullTaskAction$1(InstantRunResourcesApkBuilder.java:147)
    at com.android.build.gradle.internal.scope.BuildElements$ExecutorBasedScheduler$transform$$inlined$forEach$lambda$1.call(BuildElements.kt:121)
    at com.android.build.gradle.internal.scope.BuildElements$ExecutorBasedScheduler$transform$$inlined$forEach$lambda$1.call(BuildElements.kt:110)
    at java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1424)
    at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
    at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
    at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
    at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
    Suppressed: com.google.common.base.VerifyException
        at com.google.common.base.Verify.verify(Verify.java:99)
        at com.android.apkzlib.zip.utils.MsDosDateTimeUtils.packDate(MsDosDateTimeUtils.java:90)
        at com.android.apkzlib.zip.utils.MsDosDateTimeUtils.packCurrentDate(MsDosDateTimeUtils.java:109)
        at com.android.apkzlib.zip.CentralDirectoryHeader.<init>(CentralDirectoryHeader.java:155)
        at com.android.apkzlib.zip.ZFile.makeStoredEntry(ZFile.java:1666)
        at com.android.apkzlib.zip.ZFile.add(ZFile.java:1763)
        at com.android.apkzlib.zip.ZFile.add(ZFile.java:1635)
        at com.android.apkzlib.sign.ManifestGenerationExtension.updateManifest(ManifestGenerationExtension.java:241)
        at com.android.apkzlib.sign.ManifestGenerationExtension.access$000(ManifestGenerationExtension.java:52)
        at com.android.apkzlib.sign.ManifestGenerationExtension$1.lambda$beforeUpdate$0(ManifestGenerationExtension.java:168)
        at com.android.apkzlib.zip.ZFile.notify(ZFile.java:2250)
        at com.android.apkzlib.zip.ZFile.update(ZFile.java:992)
        at com.android.apkzlib.zip.ZFile.close(ZFile.java:1283)
        at com.android.apkzlib.zfile.ApkZFileCreator.close(ApkZFileCreator.java:189)
        at com.google.common.io.Closer.close(Closer.java:216)
        at com.android.builder.internal.packaging.IncrementalPackager.close(IncrementalPackager.java:332)
        at com.android.builder.core.AndroidBuilder.packageCodeSplitApk(AndroidBuilder.java:1449)
        ... 8 more
Caused by: com.google.common.base.VerifyException
    at com.google.common.base.Verify.verify(Verify.java:99)
    at com.android.apkzlib.zip.utils.MsDosDateTimeUtils.packDate(MsDosDateTimeUtils.java:90)
    at com.android.apkzlib.zip.utils.MsDosDateTimeUtils.packCurrentDate(MsDosDateTimeUtils.java:109)
    at com.android.apkzlib.zip.CentralDirectoryHeader.<init>(CentralDirectoryHeader.java:155)
    at com.android.apkzlib.zip.CentralDirectory.readEntry(CentralDirectory.java:365)
    at com.android.apkzlib.zip.CentralDirectory.makeFromData(CentralDirectory.java:233)
    at com.android.apkzlib.zip.ZFile.readCentralDirectory(ZFile.java:858)
    at com.android.apkzlib.zip.ZFile.readData(ZFile.java:597)
    at com.android.apkzlib.zip.ZFile.<init>(ZFile.java:510)
    ... 14 more

0 个答案:

没有答案