android - "Re-installation failed due to different application signatures" - possible to override? -


i developing app on 2 pcs error in eclipse "re-installation failed due different application signatures" when trying deploy on physical device has copy of app other machine.

my question is: possible override this, meaning deploy app despite different signatures?

the reason app has database don't want wipe, because fixing bug relating it. there quick fix doesn't require uninstalling app/copying keyrstore file between pcs ? bet there isn't, asking. thanks!

no, there no way override it. from documentation:

when system installing update application, compares certificate(s) in new version in existing version. if certificates match exactly, including both certificate data , order, system allows update.

one way work around try sign apps on both machines same keystore. if using eclipse,

  1. go preferences -> android -> build there should find path 'default debug keystore'. (usually /users/username/.android/debug.keystore.
  2. copy file new machine.
  3. inside eclipse on new machine, open preferences -> android -> build
  4. enter path file in field 'custom debug keystore'
  5. save , can run app , have signed same key.

good luck

update:

it possible configure signing key in gradle (which used android studio) , include debug key in source control. add key project folder , add following build.gradle file:

signingconfigs {         debug {             storefile file("../debug.keystore")         }     } 

and add under build types:

buildtypes {             debug {         debuggable true         signingconfig signingconfigs.debug     } } 

see documentation more details


Comments