【问题标题】:Is it possible to get the android advertising id without adding play services ads dependency?是否可以在不添加播放服务广告依赖项的情况下获取 android 广告 ID?
【发布时间】:2015-12-25 00:15:28
【问题描述】:

我使用 google play ads 依赖项只是为了获取广告 ID。

com.google.android.gms:play-services-ads:7.8.0

有什么办法可以避免这种情况,因为库的方法计数为 6201。

【问题讨论】:

  • 并不是所有的 GPS 都被宣传了。单击左侧的“外部”库,您可以看到AdvertisingId 将在哪个模块中。

标签: android google-play-services google-advertising-id


【解决方案1】:

AdvertisingIdClient 及其相关的类也可以在更小的地方找到

com.google.android.gms:play-services-basement:8.3.0

如果您使用 Google Play 服务 8.3。在此之前,您是正确的,因为它是 play-services-ads 的一部分。

无论如何,强烈建议您使用ProGuard 从您的应用中删除未使用的代码,然后再发布您的应用的零售版本。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-04-24
    • 2018-11-15
    • 2017-08-22
    • 1970-01-01
    • 2020-06-12
    • 1970-01-01
    • 2020-07-17
    相关资源
    最近更新 更多