【问题标题】:Ads warning in Google Play after implementing firebase-analytics and play-services-analytics实施 firebase-analytics 和 play-services-analytics 后 Google Play 中的广告警告
【发布时间】:2022-01-12 11:21:16
【问题描述】:

我需要 firebase-analytics 和 play-services-analytics 来记录 Firebase 事件和跟踪 INSTALL_REFERRER。添加依赖项后,我在 Google Play 中收到以下警告:“We found ad SDKs in your app”,出现了 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 清单中也有这些行:

<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>

干杯

【问题讨论】:

    标签: android firebase gradle google-analytics ads


    【解决方案1】:

    我可以通过从 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"
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-08-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-05-03
      • 1970-01-01
      相关资源
      最近更新 更多