【问题标题】:gradle.build issue - 15.0.0 15.0.1 conflict with ads-identifiergradle.build 问题 - 15.0.0 15.0.1 与广告标识符冲突
【发布时间】:2018-05-17 17:14:59
【问题描述】:

在加载com.google.android.gms:play-services-*包时,需要在不同的包中使用相同的版本。

我正在导入 gms-locationgms-analytics 使用:

implementation 'com.google.android.gms:play-services-location:15.0.0'
implementation 'com.google.android.gms:play-services-analytics:15.0.0'

我在这两个版本中都使用15.0.0,因为location 最新版本是15.0.1,但分析正在跳过15.0.1,最新版本是15.0.2

所以15.0.0 是最新的通用版本。

版本列表可以在这里看到: https://dl.google.com/dl/android/maven2/index.html

我收到一个关于 com.google.android.gms:ads-identifier 的错误(它以某种方式自行导入)它的版本是 15.0.1 - 冲突会在发布版本中产生运行时问题。

如何摆脱 ads-identifier

【问题讨论】:

    标签: android android-gradle-plugin android-build


    【解决方案1】:

    正如您在发行版notes 中看到的,就像firebase 一样,播放服务库现在也有独立版本。所以添加它们各自的版本:

    15.0.0 之后的 Google Play 服务库现在有独立的 版本号

    implementation 'com.google.android.gms:play-services-location:15.0.1'
    implementation 'com.google.android.gms:play-services-analytics:15.0.2'
    

    同时检查您的 gms 插件是否是最新的:

    classpath 'com.google.gms:google-services:3.3.1'
    

    【讨论】:

    • Android studio 使用不同版本报错,检查android studio 更新
    • 同时检查您的 gms 插件是否是最新的
    猜你喜欢
    • 2018-11-10
    • 1970-01-01
    • 1970-01-01
    • 2020-07-17
    • 1970-01-01
    • 2017-05-01
    • 2019-05-12
    • 1970-01-01
    相关资源
    最近更新 更多