75

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.

Re-installation failed due to different application signatures.

The weirdest thing is this happened after I upgraded sdk/adt and Eclipse to support SDK 2.2 It was working fine earlier, and now it doesn't, so it might be a bug.

Pentium10
  • 204,586
  • 122
  • 423
  • 502
  • 1
    I sometimes had the same problem. I don't know exactly when it occurs, but I assume its when i use a different USB port to connect my cell phone. Nevertheless I think you have to uninstall the app manually on the phone/emulator. But I can't answer if its really a bug. I have already googled but its not really common I think. – RoflcoptrException May 22 '10 at 08:27
  • I am just going to check it out, if I move to different USB port. After I removed the app it worked. I even moved to another USB port too, and it worked too, so it's not related to the USB port, I think. – Pentium10 May 22 '10 at 08:29
  • 4
    This is happing for me on for same emulator running. I just created new AVD for froyo and launched application through eclipse. After that did some modification and relaunched application in the same emulator instance and got this error. – Tushar Jul 30 '10 at 12:44
  • possible duplicate of [Why does the app signature change in Android after a classpath change?](http://stackoverflow.com/questions/2458931/why-does-the-app-signature-change-in-android-after-a-classpath-change) – mmmmmm Oct 24 '12 at 16:51

13 Answers13

113

It happens because keystores on your laptop and original pc are different. it's called debug.keystrore and located in %USER_HOME%/.android/ folder. 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 )
laplasz
  • 3,359
  • 1
  • 29
  • 40
Nikolay Ivanov
  • 8,897
  • 3
  • 31
  • 34
  • 3
    I checked this when I arrived home, and it's not a fix, as still happens although I copied the debug keystore from laptop to PC, project was modified last time on laptop. – Pentium10 May 22 '10 at 22:36
  • 11
    This worked great! I copied the debug.keystore from my laptop, did a Project/Clean, and walla, it worked! So...make sure you do a Clean after copying the file. – Steve Reed Sr May 19 '11 at 20:38
  • 1
    This didn't work for me. I am moving from pc and eclipse to mac and android studio. I copied the debug.keystore file from my pc to my mac. Could it be that copying from pc to mac does not work although copying from mac to pc does? – flobacca Oct 16 '14 at 23:50
27

I also got the same problem and fixed it. you should do the following to fix it,

  1. Uninstall the application from your mobile if you load it already.

  2. To uninstall goto settings->application->manage application.

  3. Run the application again and choose the mobile

Hope this will help you

Andro Selva
  • 53,910
  • 52
  • 193
  • 240
Mohammed
  • 279
  • 3
  • 2
5

After you copy debug.keystore to your PC, you need to rebuild project on PC.

DreamerNS
  • 91
  • 2
  • 4
3

I had the same issue using the Droid emulator. I solved it by uninstalling the package from the application settings in the emulator as you would a normal device. On the next run, it reinstalled and the error went away.

Tom
  • 31
  • 1
2

I also had the same problem and fixed it by uninstalling the app and reinstall it again.

tara
  • 51
  • 1
2

I got the same problem and fixed it by just wiping the user data on the emulator. My guess is that the emulator keeps the project installed unless you wipe the data, so if your new project doesn't match some internal parameters it doesn't like it and won't reinstall it.

Frim
  • 21
  • 1
1

After searching and checking the phone, i came to know that i am currently developing 2nd version of this application which is already downloaded from android market in my phone, now as this app is signed and having different signatures this is throwing the above error.

Now, to resolve this issue, i had just uninstalled the app from mobile and run/install the application again.

Valeh Ağayev
  • 556
  • 4
  • 12
1

I had the same issue with the emulator and i ran the command "adb uninstall TheNameOfPackage". Of course you must first go to the directory where the adb.exe has been installed, usually C:\Program Files\Android\android-sdk\platform-tools, and then run the above command.

Christos Mitsis
  • 323
  • 2
  • 6
  • 15
1

ah i think i found your answer:

Why does the app signature change in Android after a classpath change?

its changed if you change the classpath

Community
  • 1
  • 1
0

When i tried to uninstall the application from my device after this issue occurs, i cannot able to find the app in my device. I don know where it gone. Then i uninstalled using adb,

adb -d uninstall <app package name>

This is the answer who are facing the issue similar to my problem.

fargath
  • 7,844
  • 6
  • 24
  • 36
0

I had the same issue.

To fix it I uninstalled the old .apk of the project from my device.

arghtype
  • 4,376
  • 11
  • 45
  • 60
Shruti Dasgopal
  • 551
  • 4
  • 10
0

Go to device/emulator Settings -> Apps, find your app and uninstall it.

Or

In Android Studio open tab "Gradle" (on the right side), open:

appName
..appName
...Tasks
....install
.....uninstallAll

and click twice on this task to execute it.

Important note:

If you still get this error after uninstalling, try to Build->Clean Project.

If you still get this error, even if in your device Settings->Apps list you have no this app already, try to Build->Clean Project

researcher
  • 1,758
  • 22
  • 25
0

For me after I copied all of my keystore files from my machine at home, I had to do a Project->clean. After that it worked perfectly.

user330844
  • 872
  • 1
  • 12
  • 12