When uploading an APK to the Android Developer Console, everything goes normal, but there are a certain subset of users on android 5.0 and up that are unable to install or upgrade the APK. These users see a Google Play Store error 505.
There are several different resources that tell you that the 505 error is a conflict of permission. Starting in Android Lollipop, you are no longer able to have duplicate custom permissions with the same name https://developer.android.com/about/versions/android-5.0-changes.html#custom_permissions. If you check stackoverflow for this error you'll find multiple reports of people offering this as a solution. While this can sometimes be the cause of this error there are several other reasons that this, and other conflicts can happen.
1. More than one app defines the same permission
If two completely different apps define the same permission e.g if you have a user and a manager app, and both of them have something along the lines of:
<permission
android:name="same.package.name.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
2. Same app signed by different keys
You have the same app, but signed by different keys. For example if you had a release version and a debug version, you'll hit a conflict because the system sees this as two different apps requesting the same permission.
3. Conflicting authorities
But there is an entirely different situation that can occur, which is less obvious. The 505 error can also occur with conflicting authorities. If two different apps declare the same provider, such as
<provider
android:name=".provider.YourProvider"
android:authorities="com.roqbot.client.YourProvider"
android:exported="false" />
This can also provide a conflict.
The last, and hardest conflict to spot, is one that can happen with Google Play Services 8.1 and up. If you do not define an application id in your build.gradle file like this:
defaultConfig {
applicationId "com.example.my.app"
}
it is possible that it will auto-generate a provider that can conflict with other apps. To check this, go into your your build>intermediates>manifests>full>release>AndroidManifest.xml and look for
<provider
android:name="com.google.android.gms.measurement.AppMeasurementContentProvider"
android:authorities="com.google.android.gms.google_measurement_service"
android:exported="false" />
Here the authority name will conflict with other apps. If you add the applicationId to the default config, it will change this authority to
<provider
android:name="com.google.android.gms.measurement.AppMeasurementContentProvider"
android:authorities="com.example.my.app.google_measurement_service"
android:exported="false" />
This is very subtle and appears to be a bug starting in google play services 8.1. The issue can be seen discussed here. https://code.google.com/p/android/issues/detail?id=189079&can=1&q=error%20505&sort=-opened&colspec=ID%20Status%20Priority%20Owner%20Summary%20Stars%20Reporter%20Opened
The point to remember is that it may be several things, and the only thing you can verify for sure with a 505 error is that there is a conflict of some sort, and that it may or may not necessarily be a custom permission conflict.
If you are using the Facebook SDK and following the official sample code, you might also encounter the issue. In my case, I was using a same content provider name on 2 different app's manifest.
<provider
android:authorities="com.facebook.app.FacebookContentProvider123"
android:name="com.facebook.FacebookContentProvider"
android:exported="true" />
I forgot to change the default name com.facebook.app.FacebookContentProvider123. Finally fixed it by adding a dynamic applicationId as provider name.
<provider
android:authorities="com.facebook.app.FacebookContentProvider.${applicationId}"
android:name="com.facebook.FacebookContentProvider"
android:exported="true" />
Name Of The Error: Error 505
Problem: This is an unusual error code which is encountered during the updation or installation of the application from Google Play store. It shows up an error message stating “Unknown error code during Application installs 505”.
Following reasons are responsible for this error.
• It is mostly seen when you try to install an outdated version of the app.
• Error 505 can be caused due to the incompatibility of the app with your Android OS version.
• It can also arise due to cache conflict or data crash of the app.
• Error 505 may also arise due to Google Account Sync Problem.
Solution:
• At first restart your Android device, because this step usually works in getting rid off of any type of error. If it didn’t work and then try these simple steps.
• Clear Cache and Data of Google Play Store, Google Service Framework and Download Manager. To do this First of all go to Settings >> then Apps >> select All >> then Google Play Store and Clear cache and Clear data. Also Clear cache and Clear data for Google Services.
Related
When I add the wearable dependency to my Android app and upload it to the Play Store, my app is rejected due to invalid data safety (Phone Number).
Screenshot
I have checked Manifest Merge (build/outputs/logs) and there are no permissions for READ_CALL_LOG, READ_PHONE_NUMBERS, READ_PHONE_STATE, READ_SMS.
Also, when I try to remove the dependencies.
implementation 'com.google.android.gms:play-services-wearable:18.0.0'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.6.4'
And uploading it on Play Store, my app update is approved.
Do we have to add Phone Number in Data Safety to support Wearable?
EDIT :
Finally found out where is the issue. It's caused by the outdated of some libraries.
The build.gradle files don't show any warning. We have to go to Build > Edit Libraries and Dependencies > Suggestion.
I had the exact same issue but the culprit was...
'com.google.android.gms:play-services-ads:21.5.0'
I went back to
'com.google.android.gms:play-services-ads:21.2.0'
and everything was fine.
In my Flutter project, I have 2 flavors: free and full, and I use Codemagic for my CI/CD.
Only the free version comes with a Google ad banner. So I added the com.google.android.gms.permission.AD_ID permission in the manifest, then run my build on Codemagic, for the full version only.
Then I went to my Google Play console, and I got the error : This version includes the com.google.android.gms.permission.AD_ID permission, but your statement in the Play Console indicates that your app does not use the advertising ID., which is true (again, for the full version only).
So I add 2 new AndroidManifest.xml files in my project, one in free, one in full, and removed the permission from the main AndroidManifest.xml file.
Here is the content of the manifest in the android/app/src/free directory:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mistikee.mistikee.mistikee">
<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
</manifest>
And here is the content of the manifest in the android/app/src/full directory:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mistikee.mistikee.mistikee">
</manifest>
Then I launched a new build on Codemagic, everything went fine, until I went to the Google Play console, and I still got the same error. I really don't understand why. It looks like there is a cache issue somewhere.
How can I fix that, without going to the console telling that I use the advertising ID (because, again, I don't use it in the full version)?
Thanks.
I am trying to release a Flutter based Android app to the Play Store.
When I review my release in Play Store console, I have the following warning:
You must complete the advertising ID declaration before you can release an app that targets Android 13 (API 33). We'll use this declaration to provide safeguards in Play Console to accommodate changes to advertising ID in Android 13.
Apps targeting Android 13 or above and using advertising ID must include the com.google.android.gms.permission.AD_ID permission in the manifest.
I have followed the advice and added the following to my android/app/src/main/AndroidManifest.xml:
</application>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
</manifest>
When I 'flutter clean', create and upload a new bundle, I'm still getting the same warning. Does anyone know how to resolve this warning?
Note: I have incorporated Google Ads in my app using the google_mobile_ads plugin.
Luke
There are 2 steps that you have to follow to solve this problem.
add com.google.android.gms.permission.AD_ID permission in the manifest file.
Go to your Google Play Console select the app which you are trying to upload then on the left side go to Policy and programs -> App content in there fill the Advertising ID form.
So you have already done step 1. Now complete step 2 and upload your app again.
Go to your Google Play Console select the app which you are trying to upload then on the left side go to Policy -> App content in there fill the Advertising ID form.
Only if you answered with Yes in the form shown above, add the line shown below to your AndroidManifest.xml:
<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
In Application i haven't using the location but while uploading the application in playstore i am getting below warning, recently i implemented In-app updates, as per my knowledge in-app updates not required location permission.
Screenshot of warnings
New Permission Added warning: use that have the APK with version code 20 may need to accept the android.permision.ACCESS_FINE_LOCATION permission, which may result in them not upgrading to this version of the app
Tip : Ensure that the new permissions are necessary, and consider mentioning these permissions in the What's new in the release text
This permission must be coming from any of your dependencies. to check where it's coming from open your AndroidManifest.xml file and click on the merged manifest tab to see final Manifest version after merging all manifest from dependency. you can even check every dependencies manifest my clicking on the library name on the left-hand side.
Refer to the image
as per your screenshot location permission is detected in v21.
message from apk v21-
Check your manifest again and ensure there is not ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION or any other location related permission you have mentioned.
do CTRL + SHIFT + S and type location see if you find anything related location.
message from apk v20- because you have increased minSdkVersion to a higher number.
My application was originally written using Delphi v10.2.2 and TBannerAd worked just fine.
Without any code changes and after upgrading Delphi to v10.2.3 (by installing over the existing v10.2.2 using the ISO without changing anything in the installation dialogs), calling TBannerAd's "LoadAd" method started triggering this exception:
Project myproject.apk raised exception class EJNIException with message
'java.lang.IllegalStateException: The meta-data tag in your app's
AndroidManifest.xml does not have the right value. Expected 4323000
but found 7095000. You must have the following declaration within the
< application > element: < meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" / >'.
I reviewed the AndroidManifest.xml file and indeed the "7095000" value is used, but I don't know why/how delphi uses this value. Rebuilding the project generates a new AndroidManifest.xml file with the "7095000" value, so I can't directly edit the XML file as a work-around.
What causes this? Is it some setting or SDK path that changed due to the upgrade? (I tried searching but couldn't find anything relevant)
Things I tried:
Completely uninstalling the application and running it again from Delphi (on a real device, a Galaxy note 4).
Under options, changing the NDK API location and C++ Builder NSK Library paths from "\platforms\android-14" to "\platforms\android-19".
Tokyo 10.2.3 has updated Google Play Services and its libraries.
Applications created with old version don't automatically update the libraries to new ones shipped with 10.2.3 release.
To update the libraries go to Project Manager -> Android -> Android SDK xxx -> Libraries and select "Revert System Files to Default" from the popup menu.
After reverting list of included libraries should be