I have an existing Ionic application (deployed on Google play) where I have just done a new build with some bug fixes (etc). I have since updated Ionic to the latest version, and updated the Ionic CLI to 3.x etc, but other than that the build is the same (on the same machine), and I am using the same keystore file as before.
However, when I copy the released built apk to manually install on my Android device (as I always do before pushing to the store), and am now getting app not installed. The package appears to be corrupt
If I remove the existing version, then the new apk installs fine. THis is the sort of error I may expect if my signing files (keystore) has been changed, but it definitely has not, I get it from the same saved place all the time. As I have previously successfully done, I copied the key file into the platform/Android folder as described here. The resulting file form the build is android-release.apk so it has been signed.
I now have no idea how to diagnose this problem. I certainly don't want users to have to uninstall first before updating.
Does anyone have any suggestions on what else could be wrong here, and how I can begin to diagnose this?
Thanks in advance for any ideas.
[UPDATE]
Following this post, I examined the contents of the signing certificates using keytool -printcert -file CERT.RSA
of the previous and current builds. I have confirmed they have exactly they same contents (as I know they would)
[UPDATE2]
After reading some other posts suggesting it could be the AndroidManifest.xml
, I've opened each apk using this suggested app. All the contents look exactly the same except for the versionCode
and versionName
, which are obviously set to the new version.
eg
file 1
versionCode='9'
versionName='1.0.0'
file 2..
versionCode='6'
versionName='1.0.1'
These exactly reflect the version I have for each build