You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

应用因违规使用Android Advertising ID被下架,如何排查违规依赖

Flutter App Removed for Advertising ID Policy Violation (No Ads/Crashlytics Used)

Problem Description

My app has been in closed beta for roughly a month, and its latest update got pulled from Google Play for violating Android Advertising ID policy and Developer Distribution Agreement Section 4.8.

I’ve searched around, and most solutions point to Crashlytics as the cause—but I’m not using Crashlytics at all, so those posts don’t help.

This app is solely for my boss to monitor freezer thermometers; it has never displayed ads and never will. I have absolutely no need for the Advertising ID, and I’ve never explicitly called it in my code. I suspect one of my dependencies might be accessing it behind the scenes, but I don’t know enough about these packages to figure out which one.

Here’s my pubspec.yaml dependencies list:

dependencies:
  flutter:
    sdk: flutter
  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^0.1.2
  sqflite: any
  path_provider: ^0.4.1
  rxdart: ^0.18.0
  charts_flutter: ^0.4.0
  #image_picker: ^0.4.10
  transparent_image: ^0.1.0
  http: ^0.12.0
  shared_preferences: ^0.5.1+1
  package_info: any

I’m guessing package_info might be the culprit (I’m not even using it in the app right now, so I could just remove it), but I’m not sure. Could someone help me check these dependencies or walk me through how to pinpoint which one is accessing the Advertising ID?


Solution & Troubleshooting Steps

First off, your hunch about package_info makes total sense—older versions of this package did include code that accessed the Advertising ID, even if it wasn’t using it for anything meaningful. Since you’re not actually using the package in your app, just removing it is the easiest first step. Delete that line from your pubspec, run flutter pub get, rebuild your app, and try resubmitting to Google Play.

If that doesn’t fix the violation, here’s how to dig deeper:

  • Check your full dependency tree: Run flutter pub deps in your terminal. This will list every direct and indirect dependency your app uses. Keep an eye out for any packages that mention analytics, advertising, or tracking—sometimes indirect dependencies (ones pulled in by your main packages) are the unexpected culprit here.
  • Scan your Android manifest: Open android/app/src/main/AndroidManifest.xml and look for a line like <uses-permission android:name="com.google.android.gms.permission.AD_ID"/>. If you see it, delete it. Note that some dependencies might auto-add this permission, so if it comes back after rebuilding, you’ll need to track which package is adding it.
  • Search for Ad ID calls in your project: Use Android Studio’s "Find in Path" feature (Ctrl+Shift+F on Windows/Linux, Cmd+Shift+F on Mac) to search for AdvertisingIdClient or getAdvertisingIdInfo. These are the specific Android SDK methods that access the Advertising ID. This search will lead you straight to the code (either in a dependency or your own) that’s making the call.
  • Update all your dependencies: The versions you’re using are pretty outdated—many of these packages have fixed unintended Ad ID access in newer releases. Replace any with the latest stable versions for sqflite, then run flutter pub upgrade to update everything. For example, charts_flutter, shared_preferences, and path_provider have all had significant updates since the versions you’re using that might resolve this issue.

Also, double-check that you haven’t accidentally added any other analytics or crash reporting tools—even ones that aren’t Crashlytics might access the Ad ID without you realizing it.

If you try all this and still can’t find the issue, share the output of flutter pub deps and we can help you sift through it!


内容的提问来源于stack exchange,提问作者Faan

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.12 05:13:08