Android signing conflict

13,479

Solution 1

I think you are using the same package, which is not allowed for two different apps.

But for anyone who have the same error for installing another version on top of previously installed app:

I wanted to test released version of my app when the problem occured. I've had the app previously installed using eclipse, and than I wanted to install the same app but with released signature. I have even uninstalled the app using apps gallery, but the problem persisted.

The solution for me was to unistall the app using Settings->Apps->"the app"->top right corner menu->Uninstall for all users

Solution 2

I had the same error message, but these answers did not help. On a 4.3 nexus 7, I was using a user who was NOT the owner. I had uninstalled the older version but I kept getting the same message.

Solution: I had to login as the owner and go to the settings->apps... Scroll down to the end of the list where my old version was listed with a mark 'not installed'. Select it and press the 'settings' button in the top right corner and finally 'uninstall for all users'

Solution 3

Not sure what happens when you use the same signing key, because in all honesty, I never really tried it.

That being said, as Anand Tiwari, in his comment, has already simplified the answer, you cannot install two different applications with the same package name on one device. They, logically speaking, may be different to you, but for the OS, they are in fact, the same.

The problem also manifests itself when you try to upload the applications to the Android Market (Google Play). Google Play will simply not accept the second application. There is a short and simple explanation by Warren Faith here: https://stackoverflow.com/a/5788664/450534

As an example of how similar applications with a few changes are published to the Google Play store:

  1. The free version of FriendCaster is: https://play.google.com/store/apps/details?id=uk.co.senab.blueNotifyFree

  2. The paid version if the same app is: https://play.google.com/store/apps/details?id=uk.co.senab.blueNotify

Notice the ending of the package names. In this case, you will be able to install both the apps simultaneously on one device.

Solution 4

I think your problem is that both your files have the same package name. You can name both apps with similar packages, but they can't be identical. In fact, using the same package base can be used to communicate between applications ie. App1: com.mypkg.app1 and App2: com.mypkg.app2. However, they both can't be called com.mypkg.app - the package name is how Android identifies apps, and can't be identical.

You should be able to sign as many different apps (assuming their package is different) with the same key.

Make sure not to lose your signing certificate, if you lose it, you will not be able to upload a new app with the same package name. If you lose your signing certificate, you will be in big trouble.

Good luck.

Share:
13,479
Andrei G
Author by

Andrei G

Updated on June 04, 2022

Comments

  • Andrei G
    Andrei G almost 2 years

    I am developing 2 android applications, which are clients for my server. I cannot install both applications on my android phone. I install the first app to phone, everything is ok. Then when I try to install the second app on the phone, I get the message that the application will replace another application (the first one), and then I get following error:

    Application not installed: an existing package by the same name with a conflicting signature is already installed.

    I mention that I have created one separate keystore file for every application, export them as in the android official signing application guide, then zipaligned them.

    So the OS thinks that it is a single application? But in fact there are 2 different apps. What am I doing wrong?