gpt4 book ai didi

android - 如何修复 ' Manifest merger failed with multiple errors,' 错误?

转载 作者:行者123 更新时间:2023-11-29 22:59:16 24 4
gpt4 key购买 nike

我正在将 FIREBASE 连接到我当前工作的 AndroidStudio 项目,在实现所有库之后,我遇到了一个错误。

"ERROR: Manifest merger failed with multiple errors, see logs"

我该怎么办?

这是错误,我得到的是什么

Dependencies using groupId com.android.support and androidx.* can not be combined but found IdeMavenCoordinates{myGroupId='com.android.support', myArtifactId='cardview-v7', myVersion='28.0.0', myPacking='aar', myClassifier='null'} and IdeMavenCoordinates{myGroupId='androidx.swiperefreshlayout', myArtifactId='swiperefreshlayout', myVersion='1.0.0', myPacking='aar', myClassifier='null'} incompatible dependencies less... (Ctrl+F1) Inspection info:There are some combinations of libraries, or tools and libraries, that are incompatible, or can lead to bugs. One such incompatibility is compiling with a version of the Android support libraries that is not the latest version (or in particular, a version lower than your targetSdkVersion). Issue id: GradleCompatibleenter ima[enter image description here]1ge description here

最佳答案

同时使用 androidx 和 android 支持库应该会出现此问题。从 IDE 中使用 Refactor > Migrate to AndroidX 将整个项目迁移到 AndroidX。迁移到 AndroidX 后,重新检查 gradle.properties 文件中是否有这两行:

android.useAndroidX=true
android.enableJetifier=true

将这两个 gradle 插件标志设置为 true 意味着 Android 插件将使用适当的 AndroidX 库而不是支持库,并将重写它们的二进制文件。了解更多如何将整个项目迁移到 AndroidX,请关注此 link .

关于android - 如何修复 ' Manifest merger failed with multiple errors,' 错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57114818/

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