1

I am trying to get my Ionic app published. However, when trying to zipalign the apk with the following command

/Users/bertcarremans/Library/Android/sdk/build-tools/23.0.3/zipalign zipalign -v 4 android-release-unsigned.apk chartly.apk

I get the message below:

Zip alignment utility 
Copyright (C) 2009 The Android Open Source Project

Usage: zipalign [-f] [-p] [-v] [-z] <align> infile.zip outfile.zip
   zipalign -c [-v] <align> infile.zip

  <align>: alignment in bytes, e.g. '4' provides 32-bit alignment
  -c: check alignment only (does not modify file)
  -f: overwrite existing outfile.zip
  -p: page align stored shared object files
  -v: verbose output
  -z: recompress using Zopfli

How can I make the zipalign tool to work? Thanks!

Bert Carremans
  • 1,623
  • 4
  • 23
  • 47

2 Answers2

2

I found the solution.

  1. Copy the zipalign tool to the apk folder of your app. On my computer the zipalign tool was located in /Users/bertcarremans/Library/Android/23.0.3
  2. Then run the command ./zipalign -v 4 android-release-unsigned.apk chartly.apk
Bert Carremans
  • 1,623
  • 4
  • 23
  • 47
0

There is no need to copy zipalign file anywhere, if it is installed through command line a symbolic link will be created and then you can run it from anywhere.

You are not using the right syntax of the zipalign tool. Please check again, you have written zipalign twice so you are passing zipalign as a parameter to zipalign command which is not correct.

Krish
  • 379
  • 2
  • 8