Android Projects

Android Development Books

Tuesday

Re-installation failed due to different application signatures in android

 Developing my app on two PCs so obviously I get the error in Eclipse "Re-installation failed due to different application signatures" when trying to deploy on the physical device which has a copy of the app from the other machine.
                              or
I started getting errors in my Eclipse Workspace for several but not all of my projects. I noticed is was the oldest projects. I found help for the error, and built my own debug.keystore and changed the java build path to that folder. Now when I try to run any of the projects in an emulator I get this error

                                        or
 I moved my Android project to a laptop and now I get this when I hit Debug. Sounds like this is a bug? This shouldn't happen via Eclipse as far as I know.

                                       or

[2011-12-14 11:28:46 - TestProject] Android Launch!
[2011-12-14 11:28:46 -TestProject] adb is running normally.
[2011-12-14 11:28:46 - TestProject] Performing com.*******.TestProject.MainMenu activity launch
[2011-12-14 11:28:46 - TestProject] Uploading TestProject.apk onto device 'HT9CRP800333'
[2011-12-14 11:29:01 - TestProject] Installing TestProject.apk...
[2011-12-14 11:29:11 - TestProject] Re-installation failed due to different application signatures.
[2011-12-14 11:29:11 -TestProject] You must perform a full uninstall of the application. WARNING: This will remove the application data!
[2011-12-14 11:29:11 -TestProject] Please execute 'adb uninstall com.pilotfishmedia.kidgenius13in1' in a shell.
[2011-12-14 11:29:11 -TestProject] Launch canceled!
....................................................

What do you do, when you encounter this?

Re-installation failed due to different application signatures.

You must perform a full uninstall of the application. WARNING: This will remove the application data!
Please execute 'adb uninstall [package name]' in a shell.
Launch canceled!

1) Open command prompt.
2) Go to [directory path]:\android-sdk-windows\tools
3) adb uninstall [package name]

Or you can always delete the app from the "Manage Applications" in your phone. Then install again.

                              or
When the system is installing an update to an application, it compares the certificate(s) in the new version with those in the existing version. If the certificates match exactly, including both the certificate data and order, then the system allows the update.
One way to work around this will be to try to sign the apps on both machines with the same keystore. If you are using Eclipse,
  1. Go to Preferences -> Android -> Build There you should find the path to the 'Default debug keystore'. (usually something like /Users/username/.android/debug.keystore.
  2. Copy this file to the new machine.
  3. Inside Eclipse on the new machine, open Preferences -> Android -> Build
  4. Enter the path to the file in the field 'Custom debug keystore'
  5. Save and then you can run your app and have it signed with the same key.

                         or


It happens because keystores on your laptop and original pc are different. it's called debug.keystrore and located in %USER_HOME%/.android. TO be more specific it happens because eclipse tries to push apk with reinstall key. So you have two options
  1. Share debug.keystore between various development pc's
  2. Manually uninstall your apk from device ( using adb )
                             or
adb remount
adb shell
rm system/app/Music.apk
then run the project with eclipse , it works good.

but don't know why  must adt remount firs, otheriwse i couldn't
delete system/app/***.apk,
it's say it read only. 
                          or
My question is: is it possible to override this, meaning to deploy the app DESPITE different signatures?
Option #1: Uninstall the app, then reinstall.
Option #2: Synchronize your debug.keystore files between the two machines, so you are signing with the same key in both places.
Is there a quick fix that doesn't require uninstalling the app/copying the keyrstore file between the PCs ?


Other useful resoureces:
1.  http://developer.android.com/resources/faq/troubleshooting.html#apidemosreinstall

2. http://code.google.com/p/ankidroid/wiki/FAQ#When_I_try_to_install_an_.apk_of_AnkiDroid_I_get_a_%22Re-inst

3. http://stackoverflow.com/questions/5719701/re-installation-failed-due-to-different-application-signatures

4. http://www.technotalkative.com/android-re-installation-failed-due-to-different-application-signatures/

5. http://stackoverflow.com/questions/5820635/re-installation-failed-due-to-different-application-signatures-again

6. http://stackoverflow.com/questions/7063448/re-installation-failed-due-to-different-application-signatures


 
Share this post
  • Share to Facebook
  • Share to Twitter
  • Share to Google+
  • Share to Stumble Upon
  • Share to Evernote
  • Share to Blogger
  • Share to Email
  • Share to Yahoo Messenger
  • More...

0 comments

Thanks for your comment

:) :-) :)) =)) :( :-( :(( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ :-$ (b) (f) x-) (k) (h) (c) cheer

Related Posts Plugin for WordPress, Blogger...
© Google Android Lovers
Designed by BlogThietKe Cooperated with Duy Pham
Released under Creative Commons 3.0 CC BY-NC 3.0