android - Google Play Services Analytics 库实现导致 Play Console 广告警告

标签 android gradle google-play google-play-services ads

我一直在 Google Play 的广告应用内容中收到一条警告,说“我们在您的应用中发现了广告 SDK”。在发布了许多试图解决该问题的版本后,我发现原因是我的应用级构建 Gradle 文件中的这些行:

implementation ('com.google.android.gms:play-services-analytics-impl:18.0.1') {
    exclude module: "play-services-ads"
    exclude module: "play-services-ads-identifier"
    exclude module: "play-services-measurement"
    exclude module: "play-services-measurement-sdk"
}

有什么我可能遗漏要排除的吗?

我运行了“gradlew -q dependencies app:dependencies command”,这些是库的传递依赖:

+--- com.google.android.gms:play-services-analytics-impl:18.0.1
|    +--- com.google.android.gms:play-services-base:18.0.1
|    |    +--- androidx.collection:collection:1.0.0
|    |    |    \--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    +--- androidx.core:core:1.2.0
|    |    |    +--- androidx.annotation:annotation:1.1.0
|    |    |    +--- androidx.lifecycle:lifecycle-runtime:2.0.0
|    |    |    |    +--- androidx.lifecycle:lifecycle-common:2.0.0
|    |    |    |    |    \--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    |    +--- androidx.arch.core:core-common:2.0.0
|    |    |    |    |    \--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    |    \--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    \--- androidx.versionedparcelable:versionedparcelable:1.1.0
|    |    |         +--- androidx.annotation:annotation:1.1.0
|    |    |         \--- androidx.collection:collection:1.0.0 (*)
|    |    +--- androidx.fragment:fragment:1.0.0
|    |    |    +--- androidx.core:core:1.0.0 -> 1.2.0 (*)
|    |    |    +--- androidx.legacy:legacy-support-core-ui:1.0.0
|    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    |    +--- androidx.core:core:1.0.0 -> 1.2.0 (*)
|    |    |    |    +--- androidx.legacy:legacy-support-core-utils:1.0.0
|    |    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    |    |    +--- androidx.core:core:1.0.0 -> 1.2.0 (*)
|    |    |    |    |    +--- androidx.documentfile:documentfile:1.0.0
|    |    |    |    |    |    \--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    |    |    +--- androidx.loader:loader:1.0.0
|    |    |    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    |    |    |    +--- androidx.core:core:1.0.0 -> 1.2.0 (*)
|    |    |    |    |    |    +--- androidx.lifecycle:lifecycle-livedata:2.0.0
|    |    |    |    |    |    |    +--- androidx.arch.core:core-runtime:2.0.0
|    |    |    |    |    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    |    |    |    |    |    \--- androidx.arch.core:core-common:2.0.0 (*)
|    |    |    |    |    |    |    +--- androidx.lifecycle:lifecycle-livedata-core:2.0.0
|    |    |    |    |    |    |    |    +--- androidx.lifecycle:lifecycle-common:2.0.0 (*)
|    |    |    |    |    |    |    |    +--- androidx.arch.core:core-common:2.0.0 (*)
|    |    |    |    |    |    |    |    \--- androidx.arch.core:core-runtime:2.0.0 (*)
|    |    |    |    |    |    |    \--- androidx.arch.core:core-common:2.0.0 (*)
|    |    |    |    |    |    \--- androidx.lifecycle:lifecycle-viewmodel:2.0.0
|    |    |    |    |    |         \--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    |    |    +--- androidx.localbroadcastmanager:localbroadcastmanager:1.0.0
|    |    |    |    |    |    \--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    |    |    \--- androidx.print:print:1.0.0
|    |    |    |    |         \--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    |    +--- androidx.customview:customview:1.0.0
|    |    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    |    |    \--- androidx.core:core:1.0.0 -> 1.2.0 (*)
|    |    |    |    +--- androidx.viewpager:viewpager:1.0.0
|    |    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    |    |    +--- androidx.core:core:1.0.0 -> 1.2.0 (*)
|    |    |    |    |    \--- androidx.customview:customview:1.0.0 (*)
|    |    |    |    +--- androidx.coordinatorlayout:coordinatorlayout:1.0.0
|    |    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    |    |    +--- androidx.core:core:1.0.0 -> 1.2.0 (*)
|    |    |    |    |    \--- androidx.customview:customview:1.0.0 (*)
|    |    |    |    +--- androidx.drawerlayout:drawerlayout:1.0.0
|    |    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    |    |    +--- androidx.core:core:1.0.0 -> 1.2.0 (*)
|    |    |    |    |    \--- androidx.customview:customview:1.0.0 (*)
|    |    |    |    +--- androidx.slidingpanelayout:slidingpanelayout:1.0.0
|    |    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    |    |    +--- androidx.core:core:1.0.0 -> 1.2.0 (*)
|    |    |    |    |    \--- androidx.customview:customview:1.0.0 (*)
|    |    |    |    +--- androidx.interpolator:interpolator:1.0.0
|    |    |    |    |    \--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    |    +--- androidx.swiperefreshlayout:swiperefreshlayout:1.0.0
|    |    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    |    |    +--- androidx.core:core:1.0.0 -> 1.2.0 (*)
|    |    |    |    |    \--- androidx.interpolator:interpolator:1.0.0 (*)
|    |    |    |    +--- androidx.asynclayoutinflater:asynclayoutinflater:1.0.0
|    |    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    |    |    \--- androidx.core:core:1.0.0 -> 1.2.0 (*)
|    |    |    |    \--- androidx.cursoradapter:cursoradapter:1.0.0
|    |    |    |         \--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    +--- androidx.legacy:legacy-support-core-utils:1.0.0 (*)
|    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    +--- androidx.loader:loader:1.0.0 (*)
|    |    |    \--- androidx.lifecycle:lifecycle-viewmodel:2.0.0 (*)
|    |    +--- com.google.android.gms:play-services-basement:18.0.0
|    |    |    +--- androidx.collection:collection:1.0.0 (*)
|    |    |    +--- androidx.core:core:1.2.0 (*)
|    |    |    \--- androidx.fragment:fragment:1.0.0 (*)
|    |    \--- com.google.android.gms:play-services-tasks:18.0.1
|    |         \--- com.google.android.gms:play-services-basement:18.0.0 (*)
|    +--- com.google.android.gms:play-services-basement:18.0.0 (*)
|    \--- com.google.android.gms:play-services-stats:17.0.3
|         +--- androidx.legacy:legacy-support-core-utils:1.0.0 (*)
|         \--- com.google.android.gms:play-services-basement:18.0.0 (*)

最佳答案

如果您的应用没有使用广告,请不要担心,在这种情况下,这是误报,Google 知道这一点并告诉您保持原样(见下图)

我发现大多数分析 SDK 都在使用 (IDFA) 来有效地识别唯一身份用户。

enter image description here

关于android - Google Play Services Analytics 库实现导致 Play Console 广告警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70711391/

相关文章:

android - 以前工作时,上传 Unity Android App Bundle 导致 Google Play 64 位不合规错误

android - 100 条消息限制适用于一台设备还是 GCM 的每台设备?

android - 如何使用 Gradle 解决模块中的循环依赖?

java - 从命令行运行时混合 java 和 kotlin 代码的 ClassNotFoundException

android - 使用 bazel 支持在 android 上构建 tensorflow 时出错

android - 服务器收到订阅状态更改通知时如何识别用户

android - 为 Play 商店签署我的 Android 应用程序的正确方法?

java - Android NDK中的解密

android - 可以以编程方式设置 BroadcastReceiver 优先级吗?

android - 如何获得背景失焦(模糊)的 Alertdialog