Release Build/Installation fails

Hi,
when i do ionic build android --release I cannot install the android-release-unsigned.apk on any device as I will get the error There is a problem parsing the package. Then I also signed it and used zipalign and only signing etc…

With signing I managed to get to the permissions dialog of the installation but on the next step the error App not installed. .

During the building process I got errors with the translation and inappbrowser.
http://stackoverflow. com/questions/32867528/cordova-inappbrowser-resourcetype-type-issue-for-release-build
and
https://github. com/wildabeast/BarcodeScanner/issues/276

but I managed to solves these issues so I guess they are not connected to the build problem now.

I also updated and reinstalled both cordova and ionic.

Very similar problem while building Ionic 2 app. I got some errors (5 to be precise) related to translation, but .apk builds well.
After all steps described here: http://ionicframework.com/docs/guide/publishing.html I could successfully create an .apk file
But the problem is that it fails during installation. I could see the intro dialog prompting me whether I would like to install or cancel, but then I could see an error “Application is not installed”.
Screen is attached, but the message is in Russian.

I got the same issue. Even with no error …

1 Like

Finally I found a solution there : https://github.com/driftyco/ionic-app-scripts/issues/640

I replace

ionic build android --release

by

ionic build android --prod

It change the name of the application as debug. I dont no if it is a good or a bad thing. However it works.

It change the name of the application as debug. I dont no if it is a good or a bad thing. However it works.

This will sign it with the debug/developer signing credentials so if this is acceptable it will indeed work. However if you’re trying to make a production release you might want to do this ionic build android --release --prod and then sign and zipalign it per the Ionic Publishing instructions. Unfortunately those same instructions omitted the --prod which had caused me issues.

Issue reference:
ionic-app-scripts issue #621