WenChao WenChao - 1 year ago 159
Android Question

assembleTask is null in android gradle plugin 2.2-alpha2 for spoon plugin

In the zipalign task creation method from gradle plugin

InstantRunBuildContext instantRunBuildContext = this.getScope().getVariantScope().getInstantRunBuildContext();
this.zipAlignTask = this.taskManager.createZipAlignTask(taskName, instantRunBuildContext, inputFile, outputFile);
this.assembleTask.dependsOn(new Object[]{this.zipAlignTask});
return this.zipAlignTask;

Now, assembleTask is null and in turn will throw

Caused by: org.gradle.api.InvalidUserDataException: A dependency must not be empty

I have checked earlier version, assembleTask has the actual assemble task

Answer Source

this has been fixed in the latest android gradle plugin see here issue tracker

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download