azure-pipelines-tasks: Android Signing task - 'zipalign' failed with exit code 1

Required Information

Entering this information will route you directly to the right team and expedite traction.

Question, Bug, or Feature?
Type: Bug

Enter Task Name: Android Signing

Environment

  • Server - Azure Pipelines

    • This is a private company repo… I can provide details separately if needed. I will provide screenshots and error logs further down.
  • Agent - Hosted:

    • Hosted macOS

Issue Description

Android Signing task - ‘zipalign’ failed with exit code 1

I’ve attached ZIP folder containing:

  • Screenshot of pipeline definition/tasks, with Android Signing task selected.
  • Screenshot of pipeline secret variables.
  • YAML output for Android Signing task.
  • Error log from task failure.

Azure-Android.zip

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 2
  • Comments: 20 (5 by maintainers)

Most upvoted comments

For a new React Native project using Gradle 4.1+ I needed to add the following line to my gradle.properties file to get it to work with app center.

android.useNewApkCreator=false

@android-dataticket there already is an issue reported: https://issuetracker.google.com/issues/162117652 It seems that zipalign is not needed anymore.

cheers to this, thank you very much, this thread was enlightening!

@android-dataticket there already is an issue reported: https://issuetracker.google.com/issues/162117652 It seems that zipalign is not needed anymore.

Please can this be re-opened? this is happening to me on every build for some reason, same exact thing… zipalign fail with exit code 1, complaining on some of the PNG files in resources - my gradlew is already set to assembleRelease - the zipalign fails whether I’ve set to assembleDebug or assembleRelease…

just started happening randomly, it used to build fine… it builds fine in the local IDE android studio - what is going on with the pipeline?!

@android-dataticket This issue doesn’t seem to be related to zipalign task - could you please try to check tools versions compatibility? If it doesn’t help - I would recommend to fill in a ticket on https://issuetracker.google.com/issues to get the right eyes on it

ok so - when I change the gradle plugin version in the app level build.gradle file from 4.1.1 to 4.0.0, it builds successfully…

how weird… because I’m still using gradle 6.5… and gradle plugin 4.0.0 says it needs gradle 6.1.1 to run… but all I did was change the gradle plugin to 4.0.0 and left the gradle version at 6.5 and it built/zipaligned successfully…

again just to reiterate, the project builds signed apk successfully with gradle plugin 4.1.1 and gradle 6.5 in android studio locally… just having weird behavior with azure pipeline