If I download an APK and open it, I get a "Not Installed" error if the app is already present on the device. Is there any way to automatically delete the old version?

(Note I'm not trying to avoid opening the APK, which isn't allowed for security reasons. I'm just trying to avoid manually deleting the old app.)

  • 4
    Android should already do this unless the two versions of the app are signed with different keys (or possibly some other error takes place). – eldarerathis Jul 12 '12 at 15:05

As eldarerathis already pointed out in his comment on your question: If the app is already installed, and the certificate matches, you will be prompted whether you want to replace it. If the certificates differ, there's a conflict: The app cannot be updated due to the mismatch, and it cannot be installed along as the package name is already in use (apps use an internal package name, which e.g. is shown in the URL on its Google Play Store webpage). If the package is corrupted, you again get another specific error (telling you it is corrupted).

So most probably, the .apk you try to install manually has been tampered with. If it wasn't you doing so, I would refrain from using it. If it was you, and you know what you are doing -- or you know the source to be trustworthy (e.g. the developer of the app provided you with an unsigned testing version), you have to first uninstall the original app before installing the "tainted" .apk.

| improve this answer | |
  • This is an unsigned APK under development; would that explain the mismatch? – mahemoff Jul 12 '12 at 16:08
  • @mahemoff Yes. (1 more to go...) – kinokijuf Jul 12 '12 at 16:42
  • 1
    @mahemoff There aren't any unsigned APKs in Android. Even in development, the APK has to be signed with a temporary key generated by the developer. If you install another APK of the same app signed with the same key, you shouldn't get this error, which you'll only get if the two versions are signed with different keys (e.g. you are installing the release version over the debug version). – Dan Hulme Jan 27 '14 at 11:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.