【问题标题】:Android App: "play-services-gcm" requires "play-services-measurement"?Android App:“play-services-gcm”需要“play-services-measurement”?
【发布时间】:2016-06-29 07:49:44
【问题描述】:

我刚刚在我的 gradle 设置中将我的 Android 项目(使用推送通知)更改为最新的 gcm 服务 (9.0.2),并收到将 play-services-measurement 下载到相同版本的消息。

现在我问自己为什么这是必要的。我明确不希望在我的应用程序中进行任何应用程序测量,也不希望 Google 代表我做任何事情。我的依赖项中也没有这个,所以它肯定来自 gcm。

这是不可避免的吗? com.google.android.gms:play-services-gcm 是否总是需要这些测量值?毕竟,我只想要“通知”。 感谢您的澄清。

【问题讨论】:

    标签: android optimization google-cloud-messaging


    【解决方案1】:

    我找不到任何关于此的资源,只有来自 Google APIs for Android 的 release notes,这里说应用程序测量 添加了测量包,其中包含用于收集有关应用程序事件的匿名统计数据的功能,例如用户首次打开您的应用程序和应用内购买的时间。除非配置正确,否则不会收集这些数据。

    如果您想选择不报告这些统计信息,您可以将以下资源添加到您的应用程序中。

    <?xml version="1.0" encoding="utf-8"?>
    <resources>
    <integer name="google_app_measurement_enable">0</integer>
    </resources>
    

    同样来自 SO questionWAKE_LOCK 正在被 play-services-measurement 依赖添加。

    【讨论】:

      猜你喜欢
      • 2022-11-11
      • 2018-12-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-11-02
      • 1970-01-01
      • 2017-11-17
      • 1970-01-01
      相关资源
      最近更新 更多