android - 实现 firebase-analytics 和 play-service-analytics 后 Google Play 中出现广告警告

标签 android firebase gradle google-analytics ads

我需要 firebase-analytics 和 play-services-analytics 来记录 Firebase 事件并跟踪 INSTALL_REFERRER。添加依赖项后,我在 Google Play 中收到此警告:“我们在您的应用中发现了广告 SDK”,出现了 3 次。

但是,我的应用不显示任何类型的广告。

您知道如何避免广告警告吗?这就是我在应用级构建 gradle 文件中实现 Firebase 和 google play 库的方法:

//Firebase
implementation platform('com.google.firebase:firebase-bom:29.0.3') {
    exclude module: "play-services-ads-identifier"
    exclude module: "play-services-ads"
}
implementation ('com.google.firebase:firebase-crashlytics-ktx') {
    exclude module: "play-services-ads-identifier"
    exclude module: "play-services-ads"
}
implementation ('com.google.firebase:firebase-messaging-ktx') {
    exclude module: "play-services-ads-identifier"
    exclude module: "play-services-ads"
}
implementation ('com.google.firebase:firebase-analytics-ktx') {
    exclude module: "play-services-ads-identifier"
    exclude module: "play-services-ads"
}
implementation ('com.google.firebase:firebase-perf-ktx') {
    exclude module: "play-services-ads-identifier"
    exclude module: "play-services-ads"
}

//Google
implementation('com.google.android.gms:play-services-analytics:18.0.1') {
    exclude module: "play-services-ads-identifier"
    exclude module: "play-services-ads"
}
implementation('com.google.android.gms:play-services-auth:20.0.1') {
    exclude module: "play-services-ads-identifier"
    exclude module: "play-services-ads"
}

implementation('com.android.installreferrer:installreferrer:2.2') {
    exclude module: "play-services-ads-identifier"
    exclude module: "play-services-ads"
}

我的 Android list 中也有这些行:

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

<meta-data
     android:name="firebase_analytics_collection_deactivated"
     android:value="true" />

<receiver
     android:name="com.google.android.gms.analytics.CampaignTrackingReceiver"
     android:enabled="true"
     android:exported="false">
     <intent-filter>
          <action android:name="com.android.vending.INSTALL_REFERRER" />
     </intent-filter>
</receiver>

干杯

最佳答案

我能够通过从 gradle 文件的分析中排除以下三个模块来消除该警告。您可能会认为 Google 能够更好地准确查询自己的图书馆...

implementation('com.google.firebase:firebase-analytics-ktx') {
    exclude module: "play-services-ads-identifier"
    exclude module: "play-services-measurement"
    exclude module: "play-services-measurement-sdk"
}

关于android - 实现 firebase-analytics 和 play-service-analytics 后 Google Play 中出现广告警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70680679/

相关文章:

kotlin - 找不到 protoc-gen-grpc-kotlin-1.0.0-windows-x86_64.exe (io.grpc :protoc-gen-grpc-kotlin:1. 0.0)

android - NDK 中 undefined reference 错误

Android 数据/ View 绑定(bind)与 findViewById 的性能对比

android - 在 Fragment 中显示/隐藏软键盘事件

javascript - Firebase 类型错误的云函数 - 无法读取属性

Android Gradle : What is javaMaxHeapSize "4g"?

android - 背景音乐

ios - firebase ios 聊天应用程序无法正常工作

ios - 在 Firebase/Swift 上为两个匹配的用户创建聊天室的首选方法是什么?

android - 为 APK 和 app bundle 使用单独的签名 key