While downloading an app, an error dialog with this text shows up: Unknown error code during application install: "-505"
-
If you are using a library project that bundles Google Maps and your users are reporting the -505 error, see this answer for a possible solution: http://stackoverflow.com/a/32770691/1103584 – DiscDev Jan 18 '16 at 22:34
8 Answers
I've found the issue with "INSTALL_FAILED_DUPLICATE_PERMISSION".
If you have Android 5.0 and multi user enabled, check if you have the app that is causing problems in your "Guest" account and uninstall it. Then go back to your main user and try installing the app again. It worked for me! Hope Google fix this with multiple accounts.

- 886
- 7
- 17
-
Thank you! This fixed the issue for me. Definitely seems like an issue with multiple accounts. – DalvikDroid Dec 12 '14 at 19:26
-
i also faced same issue. and resoled it. they should show proper message i guess. – Paresh Dudhat Feb 12 '15 at 12:43
-
4
-
@Horse are you using Google Maps inside a library project? I've discovered a fix if you are: http://stackoverflow.com/a/32770691/1103584 – DiscDev Jan 22 '16 at 16:24
-
@DiscDev thanks but no, it was an issue with the cordova framework I was using, and having various versions of the app installed (even on different namespaces) – Horse Jan 26 '16 at 12:16
Had this issue too. I was releasing Sandbox and Production apps with different package names, but same GCM permissions.
I started using ${packageName}
in AndroidManifest.xml file.
I changed from
<!-- GCM specific permissions -->
<permission
android:name="com.playgong.permission.C2D_MESSAGE"
android:protectionLevel="signature"/>
<uses-permission android:name="com.playgong.permission.C2D_MESSAGE"/>
to
<!-- GCM specific permissions -->
<permission
android:name="${packageName}.permission.C2D_MESSAGE"
android:protectionLevel="signature"/>
<uses-permission android:name="${packageName}.permission.C2D_MESSAGE"/>
And in receiver's intent-filter from:
<category android:name="com.playgong"/>
to:
<category android:name="${packageName}"/>

- 11,345
- 4
- 67
- 71
-
1Great solution. I would have missed changing the category as well if you didn't point that out. Thanks a lot! – Stephen Aug 14 '15 at 07:53
-
-
In my case, this was happening because I publish 2 apps that are based on the same library (free vs. paid version) that is using Google Play Services / Google Maps. Google Maps is using a content provider that requires apps using your library to be configured properly for it to work inside a library.
Fix:
make sure that defaultConfig.applicationId is defined in android section of the build.gradle
file for each project using your library
android {
defaultConfig.applicationId = "com.company.appname"
}
I would recommend using the package name of the specific app. With this fix, the provider names will no longer conflict, and your app will run as expected.
Symptoms
1.) Your users are seeing the dreaded "-505" install error when installing your app from the Play Store.
2.) You will see this error message when you try to install a second app that uses your library via Android Studio:
3.) In your console, you will see a message like this:
Package couldn't be installed in /data/app/com.company.appname-1
com.android.server.pm.PackageManagerException:
Can't install because provider name
com.google.android.gms.measurement.google_measurement_service
(in package com.company.appname) is already used by
com.company.otherInstalledAppName
The fix is to make sure that defaultConfig.applicationId is defined in android section of the build.gradle
file for each project using your library
android {
defaultConfig.applicationId = "com.company.appname"
}
More reading can be found here in the original bug report: Issue 784: Multiple apps using same authority provider name

- 38,652
- 20
- 117
- 133
I think the answer is already been conveyed by @Brigadier and @andude.
And this seems to have started with the Lollipop upgrade. Here's the root cause of the same and you could cross check it in Logcat while installing.
You primarily have 2 apps on your device which have a common signed permission. i.e If you've been developing using google maps or any other module which requires a custom signature(< Package-name >.MAPS_RECEIVE or likewise) then most certainly you have two apps that have the same signed permission(i.e the package name in these permissions are the same)..

- 4,717
- 4
- 25
- 40
This is the issue because the app still exists in your apps list after uninstall, this issue comes on Android 5.0 or later(Lollipop) . For resolving this problem you should do followings-
- Go to device settings and select apps
- In this list you will get your app with "NOT INSTALLED" Tag
- Open the app and select menu button
- Tap on optionMenu and Select "Uninstall for all Users" After doing above, the problem would resolve.

- 99
- 6
This error means there is a duplicate permission in Android Manifest. Not within just one app but the other app has it as well. For example when installing app with adb install, it shows what this -505 error means. So, first app will install fine, but when you install second app, this error is seen.
Failure [INSTALL_FAILED_DUPLICATE_PERMISSION perm=com.example.permission.XYZ pkg=com.example]
So be sure not to have two apps in appstore with same perm package name.

- 500
- 1
- 5
- 11
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.

- 131
- 1
- 4