Cannot build production version (no debug) for Android

Could not find a definitive solution for building the production version for Android on the current (rc1) ionic2 framework.
I am only referring to the first step, I know how to sign and zipalign, i just cannot figure out how to build the unsigned production apk.

What I’ve tried on windows is:
cordova build --release android -prod
but that somehow seems to be working randomly only sometimes… could not tell exactly when (might be associated with reinstalling platform or something else)

Any help, link to the docs etc highly appreciated.

Why are you building with cordova instead of ionic?

I tried again with
ionic build android --release
and it seems to work ok.

1 Like