133

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: enter image description here

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

EAK TEAM
  • 5,726
  • 4
  • 30
  • 52
  • You can find your final permission in the merged manifest file at `app/build/intermediates/manifests/full/debug/AndroidManifest.xml` Have you checked? Actually, we were facing the same issue for the last 3 days. In our case `tools:node="remove"` did the job. You may get help from [here](https://stackoverflow.com/a/73132765/2289835) or [here.](https://stackoverflow.com/a/39353246/2289835) – Rumit Patel Jul 27 '22 at 06:02
  • i've add the `tools:node="remove"` but the issue still happened. any update on this issue? – Nazarudin Jul 27 '22 at 08:45
  • @RumitPatel, i have done all the tests and other things but it is still happening. It is weird, maybe a bug in Google Play. Contacted the Play Store team too and waiting for a reply... – EAK TEAM Jul 27 '22 at 14:25
  • @Nazarudin, It is weird, maybe a bug in Google Play. Contacted the Play Store team too and waiting for a reply... – EAK TEAM Jul 27 '22 at 14:26
  • Also, i changed the Advertising ID to YES (I use the AD_ID for analytics purposes), trying to update the app again but it still doesn't works ! I don't know what to do more, will definitely wait for their support, i think it is a bug, – EAK TEAM Jul 27 '22 at 14:29
  • 1
    @EAKTEAM I have the exact same problem, and I have contacted the support. Did they reply to you? – Waxren Jul 27 '22 at 18:03
  • 2
    @Waxren, yes they replied and said that if you use analytics we need to choose YES on The AD_ID permission for analytics use case. You should not remove permission manually or remove analytics modules which contains AD_ID permission since it can break things... – EAK TEAM Jul 28 '22 at 12:31
  • While this question certainly shed some light on the root cause of the problem and a potential solution, our application cannot simply conform to declaring that we do indeed use ads for the sake of Firebase Analytics. We opted to get rid of such dependency instead of playing along Google's contradiction here. The Play Console had no complaints once we did that! – Ivan Garza Dec 22 '22 at 18:48
  • 1
    The UPDATE solution in the Question worked for me. It seems firebase analytics is adding the AD ID to the Merged Manifest – Arun K Babu Apr 02 '23 at 11:57

5 Answers5

256

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. enter image description here

Boken
  • 4,825
  • 10
  • 32
  • 42
EAK TEAM
  • 5,726
  • 4
  • 30
  • 52
  • 8
    Yes, so the problem with this, is that then they say, I said I don't have ads when I do (I still don't) . If I update to say I do have ads they say my app needs special declarations to make it suitable for under 13s. If I say my app is for only over 13s they warn me that if it looks wrong an under 13s might be attracted then I will get delisted. It's madness. – Kibi Jul 31 '22 at 09:31
  • Where I get Advertising ID section section ? – Gk Mohammad Emon Aug 17 '22 at 14:29
  • 23
    @Kibi "Advertising Id" is a different section. No need to say the app has ads. Google work very hard to make the process as confusing as possible – Sergei Aug 27 '22 at 18:04
  • 2
    I had to specifically say the app has ads as it wouldn't let me submit otherwise. It's not logical. – Henryk Sep 12 '22 at 10:22
  • But I'm seeing the error even if I remove all app bundles in the release. Is it expected? – jeiea Sep 29 '22 at 14:06
  • Thanks for your information. But Google just doesn't make any sense! Why do I have to say YES even when I don't use Ads_ID. I had used tools:node="remove" and checked the merged manifest carefully. – Anh Nguyen Oct 13 '22 at 10:40
  • 2
    One thing to note is that, once you do changes as said in above screenshot, even then you get an error that you must declare ad_id in your manifest, OTHERWISE YOUR ADVERSING PROVIDER WILL BE ZEROED OUT or something like that. As it says, since your app doesn't contain ads, you can safely ignore this message,and there is option to `Ignore Adding permission`. It will never cause an update rejection issue since you don't use ads. – Divya Gupta Jan 02 '23 at 07:17
  • Can someone please report this as a bug to them so this gets fixed? I would like this to not be so broken at some point in the future as working with their ad IDs which I dont need to do is how their automated system often errors out and delists apps/accounts – NukeouT Jan 20 '23 at 10:46
39

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

Code on the Rocks
  • 11,488
  • 3
  • 53
  • 61
4

The same problem happened with me. The solution was as following:

1-Firstly I have added this line to AndroidManifest.xml file:

    <uses-permission
    android:name="com.google.android.gms.permission.AD_ID"
    tools:node="remove" />

2-Secondly I have disabled the Firebase Analytics AD ID collection by adding this line in the AndroidManifest.xml inside the application tag:

        <meta-data
        android:name="google_analytics_adid_collection_enabled"
        android:value="false" />

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.

Waxren
  • 2,002
  • 4
  • 30
  • 43
  • 4
    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 analytics use case. You should not remove permission manually or remove analytics modules which contains AD_ID permission since it can break things... So this solution should not be used – EAK TEAM Jul 28 '22 at 12:33
  • If you the developer isn't actually using analytics, the answer cannot be to force them to declare it so. This is the only answer I found, other than stop using the guilty package/library. Analytics should all be opt-in not opt-out (or even worse, forced-in). – N3sh Aug 15 '23 at 11:25
2

If you're using @react-native-firebase/analytics you can disable the AD_ID permission by adding this to your firebase.json file:

{
  "google_analytics_adid_collection_enabled": false
}

https://rnfirebase.io/app/json-config#google_analytics_adid_collection_enabled

Guy
  • 540
  • 5
  • 14
cjpete
  • 491
  • 4
  • 9
-2

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.

user16930239
  • 6,319
  • 2
  • 9
  • 33
  • This answer is about Data safety section and not about new Advertising ID section. – EAK TEAM Jul 28 '22 at 12:32
  • 1
    Thank you @Jabbar, that was exactly the info I was searching for! The dialog has now changed and I just had to click to say the app uses Ad ID for Analytics and then my app went into review :-) – James Oct 29 '22 at 18:08