Firebase documentation suggests to disable the AD_ID permission adding the following to the manifest:
<meta-data android:name="google_analytics_adid_collection_enabled" android:value="false" />
An older thread recommends excluding the
play-services-ads-identifier
from all below dependencies:
// Firebase
implementation platform('com.google.firebase:firebase-bom:26.6.0')
implementation ('com.google.firebase:firebase-core') {
exclude group: 'com.google.android.gms', module : 'play-services-ads-identifier'
}
implementation ('com.google.firebase:firebase-messaging') {
exclude group: 'com.google.android.gms', module : 'play-services-ads-identifier'
}
implementation ('com.google.firebase:firebase-crashlytics') {
exclude group: 'com.google.android.gms', module : 'play-services-ads-identifier'
}
implementation ('com.google.firebase:firebase-analytics') {
exclude group: 'com.google.android.gms', module : 'play-services-ads-identifier'
}
Another solution as mentioned in earlier answers is to remove the permission node from your manifest:
<uses-permission android:name="com.google.android.gms.permission.AD_ID" tools:node="remove"/>
I don't yet know the reproductions of each solution but have the same problem and am going to test them.
Update
The 4th answer to this post maybe the best way to go if you want to collect analytics data and don't change your code
You can choose YES to whether your app has AD_ID and then choose Analytics as the reason. I