【问题标题】:Build error while syncing 'com.google.firebase:firebase-analytics@17.2.2'同步“com.google.firebase:firebase-analytics@17.2.2”时生成错误
【发布时间】:2020-05-10 00:09:56
【问题描述】:

我正在为崩溃报告添加 Firebase 分析。虽然同步我得到以下错误

ERROR: In project 'app' a resolved Google Play services library dependency depends on another at an 
exact version (e.g. "[17.1.1]", but isn't being resolved to that version. Behavior exhibited by the 
library will be unknown. Dependency failing: com.google.firebase:firebase-messaging:17.5.0 -> 
com.google.firebase:firebase-iid@[17.1.1], but firebase-iid version was 20.0.2.The following 
dependencies are project dependencies that are direct or have transitive dependencies that lead to 
the artifact with the issue.

-- Project 'app' depends onto com.google.firebase:firebase-config@16.4.0
-- Project 'app' depends onto com.google.firebase:firebase-messaging@17.5.0
-- Project 'app' depends onto com.google.firebase:firebase-analytics@17.2.2
-- Project 'app' depends onto com.google.firebase:firebase-messaging@{strictly 17.5.0}
-- Project 'app' depends onto com.google.firebase:firebase-config@{strictly 16.4.0}
-- Project 'app' depends onto com.google.firebase:firebase-iid@{strictly 20.0.2}       
-- Project 'app' depends onto com.google.android.gms:play-services-measurement-api@{strictly 17.2.2}
-- Project 'app' depends onto com.google.firebase:firebase-analytics@{strictly 17.2.2}

【问题讨论】:

标签: android firebase firebase-realtime-database firebase-cloud-messaging firebase-analytics


【解决方案1】:

将您的所有 Firebase 依赖项更新到最新版本。另外更新后需要更新到androidx并使用compileSdkVersion28。

还与firebaseinstanceid相关,您需要检查以下内容:

What to use now that FirebaseInstanceId.getInstance().getToken() is deprecated

【讨论】:

    猜你喜欢
    • 2020-05-27
    • 2020-05-29
    • 1970-01-01
    • 2015-09-28
    • 2018-08-05
    • 2021-07-17
    • 2017-03-28
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多