Ionic 4 Android app build and zipalign


We’re using @ionic/angular v4.0.0-rc.0 and @ionic-native/core: 5.0.0-beta.22. We’re building our Android app as such:

ionic cordova build android --prod --device --release --buildConfig build.json

The build.json file has our keystore/signing information as described Android - Signing an App documentation.

I noticed in the Android publishing guide that another step that should be taken is to use the zipalign tool, but I don’t see any way to have this step be automatically completed as part of Ionic or Cordova build process.

My question: is zipalign automatically completed as part of Ionic/Cordova build process? If not, is there an easy way to integrate this into an automated build process? Ideally, it would be configuration that could be provided to the build command (if it’s not already part of build process).



It is not automatically completed as the app has to be signed with your certificate before that


Thanks for the response. Is zipalign worth doing manually? It seems like the answer might be “no” if it’s not baked into the existing build tooling.


I am actually not sure why is this not a natural step in cordova build process.;/ I did it manually, then wrote simple gulp script to automate this step. It should be the last one step after singing.