Gradle -> IllegalArgumentException: !zip.isFile()

Description of the issue

I am trying to build my source but the gradle-runner is returning this error.

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':tpro:packageDebug'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:84)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:55)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
    at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:46)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:51)
    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.execute(DefaultTaskGraphExecuter.java:236)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.execute(DefaultTaskGraphExecuter.java:228)
    at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:61)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:228)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:215)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:77)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:58)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
    at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
Caused by: java.lang.IllegalArgumentException: !zip.isFile()
    at com.google.common.base.Preconditions.checkArgument(Preconditions.java:122)
    at com.android.builder.files.IncrementalRelativeFileSets.fromZip(IncrementalRelativeFileSets.java:99)
    at com.android.builder.files.IncrementalRelativeFileSets.makeFromBaseFiles(IncrementalRelativeFileSets.java:308)
    at com.android.build.gradle.tasks.PackageAndroidArtifact.getChangedInputs(PackageAndroidArtifact.java:657)
    at com.android.build.gradle.tasks.PackageAndroidArtifact.doIncrementalTaskAction(PackageAndroidArtifact.java:563)
    at com.android.build.gradle.tasks.PackageApplication.doIncrementalTaskAction(PackageApplication.java:86)
    at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.java:108)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
    at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$IncrementalTaskAction.doExecute(DefaultTaskClassInfoStore.java:163)
    at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134)
    at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:123)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:95)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:76)

Environment:

Android & Docker, on Ubuntu 16.04.

All steps on latest version: Activate SSH, Git Clone Repo, Accept Licenses, Installing Missing Android Tools, Update Support Library, Gradle Runner, Gradle Unit Test, Deploy to Bitrise, Send a Slack…

Gradle Wrapper: 3.3
Gradle Build Tools: 2.2.3
Android SDK: 25.0.1
Kotlin: 1.1.1

Which build Step causes the issue and which version of the step?

Reproducibility

  • _Does a “Rebuild” help? No
  • _Does a rebuild without caches help? No
  • If you have multiple different build configurations (workflows), does the issue affect all/more than one? : No
  • _If it’s an issue which happens sporadically, what’s the frequency? Just today.
  • Does upgrading the build Step to the latest version help? : No
  • When did the issue start? : Today

Build log

Hi @ppamorim,

Thanks for reporting the issue here!

Based on the log it seems to be related to: https://code.google.com/p/android/issues/detail?id=230211

If that wouldn’t help can you please follow this guide and let us know how it goes?

Is Bitrise ready to use Gradle 3.3 and SDK 25.0.1?

Fixed, just update from Gradle Build Tools 2.2.3 to 2.3.0.

Thanks for reporting the solution @ppamorim! :rocket: :slight_smile: