İnformation about zipalign

I faced some problem while using “zipalign” so i want to give a clear information how to do that .

  1. find “zipalign.exe” in your computer.(Android SDK must be installed)
    2)go to that directory on command prompt .
  2. zipalign -f -v 4 PATH_OF_YOUR_SIGNED_APP PATH_WHERE_YOU_WANT_TO_ZIPALIGNED_APP

Example:
C:\Users\home\Documents\build-tools\25.0.2>zipalign -v 4 C:\Users\home\benimsozluk\platforms\android\build\outputs\apk\android-release-unsigned.apk C:\Users\home\benimsozluk\myapp.apk

Thank YOU

There is a smarter solution.

Step 1: Create your certifacate
Step 2: Create release-signing.properties file in your platform/android folder with the following content

target=android-25
android.library.reference.1=CordovaLib
storePassword=YourPassword
keyPassword=YourPassword
keyAlias=myComapay
storeFile=../path-to-your-certificate/android-release-key.jks

When you run now ionic build android --prod the .apk is automatically signed and verified.

2 Likes