“App not Installed” Error on Android When Updating to Newer Version

I recently updated an old Cordova Android app and tried to install it on my Android phone which had previous version installed already and the install failed with the message “App Not Installed”. Other than updating Android version and couple of plugins, everything else was same old and I had correctly changed “android-versionCode” as well as “version” to higher number so nothing looked wrong but I suspected it had something to do with either the version code or the certificates I was using to sign the app so I decided to look into the previous APK file and try to find something out. We can use AAPT tool to look into APK files which can be found in build-tools\<buildToolVersion> folder (for ex, C:\Program Files (x86)\Android\android-sdk\build-tools\23.0.1).

Go to the folder and run following command in the command prompt

aapt dump badging myapp.apk

It turned out that though I had android-versionCode code in my config as “6” the actual android-versionCode was “48”. For some reason android-versionCode in my APK was different and much higher than what I actually had in the config file. I changed android-versionCode to next higher value and now I was able to update the app on my Android phone over previous version.


Leave A Comment

Your email address will not be published.