Sunday, April 19, 2015

Android App Installation Issues

I recently started developing Android Apps.

I encountered some strange issues installing the app I was developing on my phone (nexus 5 android version 5.1.1).

I got this strange error message :
"
 Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]
"

A closer look in the log-cat revealed this message :
"
 signatures do not match the previously installed version; ignoring!
"

After poking around I found that there can be couple of things causing this problem.
1. You might have changed the SDK version between your last install to this new build
2. For some reason signature of your app changed (which can be if you try to install the app from your friends (or any new) device.

Solution to this :
1.  uninstall the app and restart the device. It should work in most cases.
2. But for some reason even after doing this you get the same error message while installing the app.
Goto your phones' : Settings > Apps > All (tab) . Remove the app from the list here. It seems this can happen if you have multiple users on your machine and if you install an app for all users. Just removing /uninstalling from your user login will not help. So need to remove for all users. This will make sure that android has no history of previous version of the app to compare before installing.

Spent half day debugging this stupid thing. I hope this saves time for someone somewhere!

Happy developing!!