Android App Not Install. An existing package by the same name with a conflicting signature is already installed

AndroidAndroid Install-Apk

Android Problem Overview


In my emulator, when I try to do an upgrade of my apk programmatically. I get:

Android App Not Install.

An existing package by the same name with a conflicting signature is already installed

enter image description here

I'm still in the testing phase of this upgrade, so the file I download is a signed apk of a previous version, which I think should work without any issues.

From the suggestion in: https://stackoverflow.com/questions/19045353/an-existing-package-by-the-same-name-with-a-confilcting-signature-is-already-ins I tried to run the emulator both in debug mode and in normal mode... neither worked.

Any thoughts on what I'm missing?

Android Solutions


Solution 1 - Android

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 Settings -> Apps, then swipe to the All tab. Scroll down to the very end of the list where the old versions are 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 2 - Android

The problem is the keys that have been used to sign the APKs, by default if you are running directly from your IDE and opening your Emulator, the APK installed in the Emulator is signed with your debug-key(usually installed in ~/.android/debug.keystore), so if the previous APK was signed with a different key other than the one you are currently using you will always get the signatures conflict, in order to fix it, make sure you are using the very same key to sign both APKs, even if the previous APK was signed with a debug-key from another SDK, the keys will definitely be different.

Also if you don't know exactly what key was used before to sign the apk and yet you want to install the new version of your app, you can just uninstall the previous application and reinstall the new one.

Hope this Helps...

Regards!

Solution 3 - Android

 Go to Settings > Apps, find and open the app info. Then, open the overflow menu (3 vertical dots), and choose Uninstall for all users.

enter image description here

Go to Settings > Apps, find and open the app info. Then, open the overflow menu (3 vertical dots), and choose Uninstall for all users.

Solution 4 - Android

If you are using the debug apk, the key that is used to sign it is in

C:\Users\<user>\.android\debug.keystore

If you use that same key, there should not be a conflict when installing.

Solution 5 - Android

If you don't want to bother with the keystore file, then just remove the package altogether for all users.

Connect your device with Mac/PC and run adb uninstall <package>

Worked for me.

Ref: https://android.stackexchange.com/questions/92025/how-to-completely-uninstall-an-app-on-android-lollipop

Solution 6 - Android

There is a difference between signed and unsigned APK files. Most likely you had an unsigned on there previously. You just need to delete the unsigned before you install the signed version. How this can be accomplished varies on the exact version, but in general, go on the emulator to settings-> application, long click your app, and delete/remove/uninstall it.

Solution 7 - Android

If above solutions did not work for you then you may have doing something as following ..

  1. installing the app from Appstore.
  2. updating it with sign APK with same package name updated version.

So basically there are two kinds if APK's.

  1. you uploaded on playstore known as original APK.
  2. download from playstore known as derived APK.

In this case basically you are downloading derived apk and updating it with original APK.

For let it work fine uploaded new signed released APK in the internal test mode on the Google Play Store and download the derived APK to check the update scenario.

enter image description here

Solution 8 - Android

If you use multiple users at android, verify that the app is uninstalled everywhere.

Solution 9 - Android

I had an issue where both debug and release build won't install on devices I used for debugging. The same msg would appear when trying to install the new version. The only workaround was to uninstall the current version and install the new one.

It looks like Android studio marks the apk it installs so that installation using the package managers would distinguish between version installed for debugging and versions downloaded from Google play or other external sources (this never happened to me when using eclipse).

Solution 10 - Android

It may be application is not uninstall successful. If your device is this case, you can try this method.

First get the package name of the application, e.g 'com.xxx.app', you can use Root Explorer and find it from Manifest file(RE can decode the file). then you can use this script to uninstall it:

adb shell pm uninstall com.xxx.app // replace to package name that you want to remove

Solution 11 - Android

There may be another reason when your application will not update when you either change/add/remove shareId in AndroidManifiest.

"android:sharedUserId"

Please check that also.

To prevent would recommend to use sharedUserId in your application despite in your current requirement you need or now.

Solution 12 - Android

Same package error:

  1. Create a new Package in your app with different name.
  2. Copy and paste all file in your old package to new Package.
  3. Save Code.
  4. Delete old Package And Clean and rebuild project.

Solution 13 - Android

enter image description hereI had to login as the owner and go to Settings -> Apps, then swipe to the All tab. Scroll down to the very end of the list where the old versions are 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 14 - Android

I tried all the above and it did not work.

I found that in spite of uninstalling the app a new version of the app still gives the same error.

This is what solved it: go to Settings -> General -> application Manager -> choose your app -> click on the three dots on the top -> uninstall for all users

Once you do this, now it is actually uninstalled and will now allow your new version to install.

Hope this helps.

Solution 15 - Android

I just choose uninstallAll in Gradle Bar. It worked for me.

enter image description here

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJames OravecView Question on Stackoverflow
Solution 1 - AndroidagelbessView Answer on Stackoverflow
Solution 2 - AndroidMartin CazaresView Answer on Stackoverflow
Solution 3 - AndroidKeshav GeraView Answer on Stackoverflow
Solution 4 - AndroidSantiagoView Answer on Stackoverflow
Solution 5 - AndroidAvijitView Answer on Stackoverflow
Solution 6 - AndroidPearsonArtPhotoView Answer on Stackoverflow
Solution 7 - AndroidWahab Khan JadonView Answer on Stackoverflow
Solution 8 - AndroidMartin KoubekView Answer on Stackoverflow
Solution 9 - AndroidFunkSoulBrotherView Answer on Stackoverflow
Solution 10 - AndroidtwiceYuanView Answer on Stackoverflow
Solution 11 - AndroidPawan MaheshwariView Answer on Stackoverflow
Solution 12 - AndroidVIJAY RAVALView Answer on Stackoverflow
Solution 13 - AndroidAshish KumarView Answer on Stackoverflow
Solution 14 - AndroidFelixFelicisView Answer on Stackoverflow
Solution 15 - AndroidKhay LeangView Answer on Stackoverflow