You uploaded an APK that is not zip aligned when running Devops Pipeline Build

2k views Asked by At

I have created a build pipeline in Devops for releasing my app to the Google Play Store. The build succeeds however, when uploading the resulting APK file to Google Play Store it complains - "You uploaded an APK that is not zip aligned. You will need to run a zip align tool on your APK and upload it again.".

I have checked the Android Signing Task within the pipeline to ensure that Zip Align is enabled.

When performing the build manually through VS2019 and signing the APK it all works fine but, I'd like to get the pipeline working.

Please help.. Thanks in advance !

3

There are 3 answers

0
Sach K On BEST ANSWER

The issue was the path to the APK within the pipeline. Once this was set correctly the APK uploaded fine into Google Play Store.

0
LoLance On

You uploaded an APK that is not zip aligned. You will need to run a zip align tool on your APK and upload it again.

According to this document: When using apksigner, it is important to first zipalign the application, and then to sign it with apksigner.

I think maybe you only enable the Zipalign option. For this,you need to enable both the Signing Options and Zipalign options for Android Signing Task. You can follow this document for more details.

0
Alok Kumar On

When I generate the .apk it is saying: .apk. Failed with message: Error: APK is not zip aligned.

To over come from this issue please make sure that task: AndroidSigning@3 must have see the solution with detail

enter link description here