Sunday, February 5, 2012

Solving the "Re-installation failed due to different application signatures" error when debugging Android apps

If you work on an android app from multiple workstations (i.e a laptop and a desktop) you might have encountered the following error, when trying to install an app for debugging on a device that has a version of the app,that was build on the other workstation.

Re-installation failed due to different application signatures.

Normally you have to go to Seetings->Apps and remove the application manually before adb can re-install it.

To solve this you need to do two things.

Copy the file debug.keystore which resides in your home_dir/.android directory to both (or all) the machines you debug from.

and second rebuild the app, using the new key.

Now the app will be "automagically" updated on the device without having to go over a manual uninstall.

No comments: