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.