gpt4 book ai didi

java - 使用检查您的依赖关系树

转载 作者:行者123 更新时间:2023-12-02 10:57:19 25 4
gpt4 key购买 nike

当我在我的 gradle 中添加 firebase 验证时出现此错误

[错误:无法通知依赖项解析监听器。

The library com.google.android.gms:play-services-basement is being requested by various other libraries at [[11.0.4,11.0.4], [15.0.1,15.0.1]], but resolves to 15.0.1. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies. The library com.google.firebase:firebase-common is being requested by various other libraries at [[11.0.4,11.0.4]], but resolves to 16.0.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.]1

最佳答案

该错误意味着 Gradle 不知道该怎么做,因为您(或您的依赖项)正在声明同一依赖项的不同版本,并且它们彼此之间不兼容。

正如错误所示:

Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.

您应该回滚更改并运行:

./gradlew -q :app:dependencies

检查您拥有哪些声明com.google.android.gms:play-services-basement的依赖项,然后您可以尝试检查您是否正在使用这些依赖项的最新版本。

另一个选择是开始玩 Gradle resolution strategy例如使用forceexclude

无论如何,最重要的是确定您使用的依赖项和版本。最好的方法是执行您在错误中看到的 :dependencies 任务。

希望它有用,问候!

关于java - 使用检查您的依赖关系树,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51624730/

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