gpt4 book ai didi

android - 使用实现或 api 时,Firebase 性能配置因 v1.1.2 而失败

转载 作者:塔克拉玛干 更新时间:2023-11-02 22:35:08 25 4
gpt4 key购买 nike

我正在尝试将我的 firebase-plugins 依赖版本升级到 1.1.2,它支持 Android Gradle 插件版本 3+,但是 Gradle 构建配置一直失败,除非我使用已弃用的 compile 。我正在使用 Play Services 版本 11.4.2 并且我添加了 firebase-perf 依赖项,但失败了:

implementation "com.google.firebase:firebase-perf:$playServicesVersion"

修复它的唯一方法是将上面的implementation 更改为compile。有没有人找到解决这个问题的方法? (除了降级到 firebase-plugins 版本 1.1.0-alpha1 之外?)

这是错误信息:

* What went wrong:
A problem occurred configuring project ':app'.
> To use the Firebase Performance Plugin, the Firebase Performance Monitoring SDK must be added to the app's build.gradle. Please add compile 'com.google.firebase:f
irebase-perf:VERSION_NUMBER_GREATER_THAN_OR_EQUAL_TO_11.0.4' to the app's build.gradle.

编辑:这已在 firebase-plugins:1.1.3 中修复。

最佳答案

此错误是因为 firebase-perf 插件专门查找 com.google.firebase:firebase-perf SDK 是否存在“编译”配置。如果 SDK 在构建时未包含在 build.gradle 中,则稍后会出现运行时崩溃。

Android Studio 3.0 将“编译”替换为“实现”,插件代码应改为检查 firebase-perf SDK 的“实现”配置。

现在的解决方法是继续使用:编译“com.google.firebase:firebase-perf:$playServicesVersion”

这将在未来的 firebase-plugins 版本中得到修复。

关于android - 使用实现或 api 时,Firebase 性能配置因 v1.1.2 而失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47103774/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com