Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

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.)

share|improve this question
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
add comment

1 Answer

up vote 8 down vote accepted

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.

share|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
    
Thanks. @izzy if you can please update to reflect this and then I'll accept the answer. –  mahemoff Jul 12 '12 at 16:50
1  
@mahemoff Done, thank you! –  Izzy Jul 12 '12 at 22:34
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 at 11:50
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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