Cannot update my app in Google Play since it says:
This release includes the com.google.android.gms.permission.AD_ID
permission but your declaration on Play Console says your app doesn’t
use advertising ID.You must update your advertising ID declaration.
First thing is that the app not using ads.
The library which is injecting the permission is -> jetified-play-services-ads-identifier-18.0.0
but i don’t know where it is coming from.
Also to be sure that this permission(no matter what) is deleted, added in my app manifest:
<uses-permission android:name="com.google.android.gms.permission.AD_ID" tools:node="remove" />
But it is still saying that my app cannot be updated because it is containing that permission. I have checked the manifest via APK analyzer just to be sure, and it doesn’t have the permission in the manifest file(i don’t know why it is still saying that the permission is there)…
Also updated the Advertising Setting on Play Store:
But still the same is happening 🙁
UPDATE
Found where this permissions are coming from and disabed those modules:
implementation ("com.google.firebase:firebase-analytics-ktx:21.1.0") {
exclude module: "play-services-ads-identifier"
exclude module: "play-services-measurement"
exclude module: "play-services-measurement-sdk"
exclude module: "play-services-measurement-api"
}
After that change the merged manifest doesn’t contains anymore that permission also tested via APK Analyzer too but unfortunately Google Play still says that the app contains the permissions (WEIRD)…
Any help is appreciated 🙂
5
Answers
After contacting Google Play support they replied and said that if you use analytics we need to choose YES on The AD_ID permission for an analytics use case on the Advertising ID section.
You should not remove permission manually or remove analytics sub-modules that contain AD_ID permission since it can break things...
So just need to choose YES even if the app is not using Ads.
If you use
firebase-analytics
you should answer the questions like the following:does your app use Ad ID?: Yes
Collected: Yes
Shared: Yes
Processed ephemerally?: No
Required or Optional?: Optional(Given you implement consent/Opt-Out)
Note: firebase analytics can NOT work without Identifying the unique user, and they use Ad ID to do this.
The same problem happened with me. The solution was as following:
1-Firstly I have added this line to AndroidManifest.xml file:
2-Secondly I have disabled the Firebase Analytics AD ID collection by adding this line in the AndroidManifest.xml inside the application tag:
3-Then I went to the Google play console App Content -> Advertising ID -> Choose Yes and mark the Analytics option and check Turn off release errors check box.
4-After that I have rebuild the app, generated a new bundle and uploaded to the google play console but still when I submit it shows the same error then I have pressed Shift+F5 in chrome to reload the page without cache and then it worked and the error disappeared.
Flutter Devs
If you’re using the firebase_analytics package, the com.google.android.gms.permission.AD_ID permission is automatically added to your app (source).
The solution is the same as mentioned in the accepted answer – Select yes and check the box next to "Analytics".
If you’re using
@react-native-firebase/analytics
you can disable the AD_ID permission by adding this to your firebase.config file:https://rnfirebase.io/app/json-config#google_analytics_adid_collection_enabled