2

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.

matteoh
  • 2,810
  • 2
  • 29
  • 54
  • 1
    It is possible that some package that you use adds this `AD_ID`, for example some Firebase packages do (if I remember correctly Crashlytics and Analytics for example). – Peter Koltai Jan 25 '23 at 21:05
  • 1
    Check `build/app/intermediates/merged_manifest` and `build/app/intermediates/merged_manifests` folders is your project, and look for `AD_ID` in the `AndroidManifest.xml` files to find out. – Peter Koltai Jan 25 '23 at 21:07
  • 1
    See [this](https://stackoverflow.com/questions/73132752/i-dont-use-ads-in-my-flutter-app-then-why-this-message-is-showing-in-my-play-co). – Peter Koltai Jan 25 '23 at 21:07
  • Thanks, I'll take a look at all of that very soon. – matteoh Jan 25 '23 at 22:41
  • @PeterKoltai You're right, AD_ID is in both merged manifests – matteoh Jan 26 '23 at 10:17
  • After some research, it's apparently not a problem. When you see the error in the Google Play Console, you have to tell that, even though your apps contains ads (or, at least, need the AD_ID permission), it's only because your app needs that to work and not for actual ads. Thanks all for your help! – matteoh Jan 26 '23 at 10:39
  • @matteoh could you perhaps self answer this question with the solution you found to mark this question as answered? – Maks Feb 09 '23 at 06:56

0 Answers0