Failure [INSTALL_FAILED_ALREADY_EXISTS] when I tried to update my application

AndroidInstallation

Android Problem Overview


when I tried to update my applcation with new version that has same signature as previous one, shows above error.

What I am missing?

Android Solutions


Solution 1 - Android

If you install the application on your device via adb install you should look for the reinstall option which should be -r. So if you do adb install -r you should be able to install without uninstalling before.

Solution 2 - Android

You are getting that error because an application with a package name same as your application already exists. If you are sure that you have not installed the same application before, change the package name and try.

Else wise, here is what you can do:

  1. Uninstall the application from the device: Go to Settings -> Manage Applications and choose Uninstall OR
  2. Uninstall the app using adb command line interface: type adb uninstall After you are done with this step, try installing the application again.

Solution 3 - Android

To Install
adb install -r exampleApp.apk

(The -r makes it replace the existing copy, add an -s if installing on an emulator)

Make sure the app is signed the same and is the same debug/release variant

Bonus

I set up an alias in my ~/.bash_profile, to make it a 2char command.

alias bi="gradlew && adb install -r exampleApp.apk"

(Short for Build and Install)

Solution 4 - Android

It might mean the application is already installed for another user on your device. Users share applications. I don't know why they do but they do. So if one user updates an application is updated for the other user also. If you uninstall on one, it doesn't remove the app from the system on the other.

Solution 5 - Android

If u still facing problem then try to uninstall application using command prompt. just add command adb uninstall com.example.yourpackagename then try to re-install again.It works!

Solution 6 - Android

With my Android 5 tablet, every time I attempt to use adb, to install a signed release apk, I get the [INSTALL_FAILED_ALREADY_EXISTS] error.

I have to uninstall the debug package first. But, I cannot uninstall using the device's Application Manager!

If do uninstall the debug version with the Application Manager, then I have to re-run the debug build variant from Android Studio, then uninstall it using adb uninstall com.example.mypackagename

Finally, I can use adb install myApp.apk to install the signed release apk.

Solution 7 - Android

This can also be caused if the application was built from different PCs. You can make it easier for your whole team if you copy a debug.keystore from someone's machine into a /cert folder at the top of your project and then add a signingConfigs section to your app/build.gradle:

  signingConfigs {
    debug {
      storeFile file("cert/debug.keystore")
    }
  }

Then tell your debug build how to sign the application:

  buildTypes {
    debug {
      // Other values 
      signingConfig signingConfigs.debug
    }
  }

Check this file into source control. This will allow for the seamless install/upgrade process across your entire development team and will make your project resilient against future machine upgrades too.

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
QuestionDev.SintoView Question on Stackoverflow
Solution 1 - AndroidWarrenFaithView Answer on Stackoverflow
Solution 2 - AndroidMuhammad MubashirView Answer on Stackoverflow
Solution 3 - AndroidGiboltView Answer on Stackoverflow
Solution 4 - AndroidGregPView Answer on Stackoverflow
Solution 5 - AndroidSanket SanganiView Answer on Stackoverflow
Solution 6 - AndroidBlueSpectrumzView Answer on Stackoverflow
Solution 7 - AndroidBill MoteView Answer on Stackoverflow