Unknown error code during application install "-505"

25.9k views Asked by At

I have checked this android 5.0 lollipop app install shows Unknown error code during application install: "-505". But it doesn't seem to address my case as I dont use multiuser env.

I have an app in the playstore which worked fine on my nexus 4(4.4.x) till i upgraded to lollipop and it showed this error every time i tried to install it from playstore(It installs fine if I run it via adb).

Can't understand why I might be facing this issue, neither is there any other reference to this error code. Any help is appreciated.

8

There are 8 answers

10
humblerookie On BEST ANSWER

This seems stupid on my part, yet finally found the answer which seems to be the fact that I had another dev app(diff package name) which had a common signed permission with the playstore app. Buried deep in my logcat was this.

11-21 16:20:02.855: E/Finsky(8986): [1] PackageInstallerImpl.handleCommitCallback: Error -505
while installing <package>: INSTALL_FAILED_DUPLICATE_PERMISSION: Package <package> attempting to
redeclare permission <package>.permission.MAPS_RECEIVE already owned by 

beginning with lollipop it seems this isn't permitted. Thanks to everyone.

EDIT

The solution if not apparent yet is to change the permission from

 <permission android:name="<old package>.permission.MAPS_RECEIVE"
 android:protectionLevel="signature" />

to

<permission android:name="<new package>.permission.MAPS_RECEIVE" 
android:protectionLevel="signature" />

or whichever signed permission that is causing the same.

4
nitzanwe On

With an official Lollipop version and for mac users (i'm sure it's analogue to windows users):

  • Go to the terminal,
  • cd into: ADT/sdk/platform-tools
  • type ./adb uninstall the.app.package

and thats it!

  • you just uninstalled the app
  • don't add the -k flag - ('-k' means keep the data and cache directories)

good luck!

2
Jendrik On

This is caused by a bug with app certificate parsing in Lollipop:

https://code.google.com/p/android/issues/detail?id=79089

0
Shrestha Ashesh On

I have got similar problem and solved with this solution.

Solution: After you update your Android device to Android 5.0 Lollipop from an older version using Over-the-air update or sideloading factory image, do a factory reset. It has been found out that if you do a factory reset immediately after updating your Android version, the error does not occur, but if you don’t the error persists. Don’t forget to clear the cache too, going to Menu > Settings > Apps > Google Play Store > Clear Cache. Clear the data too, from the very same option.

Source: http://appslova.com/android-fix-unknown-error-code-application-install-505-error-505/

Hope this help!!

0
Michael Perry On

If the app you are trying to install has the same certificate as a similar app or related app with the SAME certificate, then Android 5.0 won't allow the installation, believing you are installing a duplicate of the already installed (but different) app. Only solution that worked for me? Uninstall the app with the same certificate, which would be an app made by same developer that made the app you are trying to install. Once you've uninstalled that app, install the problematic app, then go back and reinstall the other app which was already installed. This problem happened to me only once, when trying to install the FB Messenger app. I finally was able to install it after I uninstalled the Facebook app. Then I reinstalled Facebook after Messenger was installed. OK, good luck to all and hope this helps some of you.

0
Fkd On

Try resetting the play store app. You won't lose your apps following these steps. Nothing important will be lost.

Steps to follow on a motorola xoom

Go to the app drawer (menu) Tap settings Tap applications Tap the "All" tab Scroll through and look for play store Tap Play Store (not play store services!) Tap "clear data" You will then get a warning, click "ok" That's it, go through your problem again and see if it fixed. Bear in mind you will have to re-accept the terms and conditions for the play store app, when this comes up, simply click "accept"

0
tibbi On

try adding applicationId to the defaultConfig section of gradle file like

defaultConfig {
    applicationId "com.example.www"
}
0
Mak On

Multiple users installing same app on same device may cause this error. Please remove other app from the device and that should work.

I faced similar issue, however in my case it was an old development build sitting on my device and when I was trying to install from play store this error was coming.