Ionic 3 APK update on mobile device not working


I have been using Ionic for a long time and this error did not occur so far.
I build my APK and install it as usual. If I now want to update the APK on my mobile phone (because the app already exists) it will not install the latest code but some older version.
I have now found out that I can install the latest version if I uninstall the app first.

My build commands:

ionic cordova build --release android
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk alias_name
zipalign -v 4 platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk App.apk 

If you need any files or other things just ask.

Thank you in advance for your help.

Are you using Ionic Pro stuff? This sounds like it might be downloading an old version somehow.

Post your ionic info output please.

My Ionic Info Output:


   ionic (Ionic CLI)  : 4.1.2 (C:\Users\pierr\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.0


   cordova (Cordova CLI) : 8.0.0
   Cordova Platforms     : not available
   Cordova Plugins       : cordova-plugin-ionic 5.0.0, cordova-plugin-ionic-keyboard 2.1.2, cordova-plugin-ionic-webview 2.0.2, (and 7 other plugins)


   NodeJS : v8.11.2 (C:\Program Files\nodejs\node.exe)
   npm    : 5.6.0
   OS     : Windows 10

I found out that the app likes to use old versions even without update / reinstallation. I then have to clear the memory of the app, then it works again. Sounds slightly confusing to me.

That is strange. What does ionic cordova platforms list return?


> cordova platform ls
Installed platforms:
  android 7.0.0
Available platforms:
  browser ~5.0.1
  ios ~4.5.4
  osx ~4.0.1
  windows ~5.0.0
  www ^3.12.0

And to the other question: I use Ionic pro primarily for monitoring. In between I tested the deployment system (but I didn’t like it). There is still an entry under “Deploy builds”, I don’t know if this is important.

In my folder I removed the remote for Ionic (git) and use only gitlab.
But I don’t know if this has anything to do with it. if I empty the memory / delete the app and install it it works. I also had the problem a few times today that the app just had the old layout (nothing reinstalled, etc). I had to empty the app’s memory and it worked again (without reinstalling).

If it should help, here is the repo (unfortunately not the best code style, I definitely have to make it tidier): (And yes, I’m German, that’s why much of the frontend is written in German. The variables should be in English :D)

Your Cordova tooling seems to be out of date, which might be causing all kinds of problems.
You can read about how to figure out the current Cordova versions and how to update CLI, platforms and plugins here:

Is this the state you tend to see?

My guess is still somehow is active for you. I don’t know much about it unfortunately.

I don’t know, all required versions are available or do I misunderstand something?:


In theory, nothing can be deployed once I have completely removed ionic from git. So there is no deploy request for Ionic anymore.

But I somehow don’t think that’s related to that. I have to empty the memory to run / install the app properly…

Yes, see the 7.0.0 vs. 7.1.1 on cordova-android.

You removing the ionic remote on your local checkout of your repository doesn’t really matter what your app does and what Ionic still has on its servers.

But if you are sure this is not the problem, you will have to keep looking elsewhere. I have no idea.

1 Like