简体   繁体   English

清单合并失败问题 android 支持

[英]Manifest merger failed issue android support

I am getting this error after inserting a dependent implementation in my project.在我的项目中插入依赖实现后,我收到此错误。

NDK Resolution Outcome: Project settings: Gradle model version=5.4.1, NDK version is UNKNOWN NDK解析结果:项目设置:Gradle model版本=5.4.1,NDK版本未知

Manifest merger failed: Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).清单合并失败:来自 [com.android.support:support-compat:28.0.0] 的属性 application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) 也存在于 AndroidManifest.xml:22:18-91 [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory)。 Suggestion: add 'tools:replace="android:appComponentFactory"' to element at AndroidManifest.xml:18:5-95:19 to override.建议:将 'tools:replace="android:appComponentFactory"' 添加到 AndroidManifest.xml:18:5-95:19 的元素以覆盖。

The included dependency:包含的依赖项:

implementation 'com.google.android.gms:play-services-vision:18.0.0'

my build.gradle looks like this:我的 build.gradle 看起来像这样:

在此处输入图像描述

If I remove the dependency import, the error disappears.如果我删除依赖项导入,错误就会消失。 I need the dependency in question to read qr code.我需要有问题的依赖项才能读取二维码。

I read the post below but none of the solutions worked for me.我阅读了下面的帖子,但没有一个解决方案对我有用。

NDK Resolution Outcome: Project settings: Gradle model version=5.4.1, NDK version is UNKNOWN error NDK 解析结果:项目设置:Gradle model 版本=5.4.1,NDK 版本为 UNKNOWN 错误

I'll suggest you downgrade the version of the 'com.google.android.gms:play-services-vision' from 18.0.0 to a lower version.我建议您将'com.google.android.gms:play-services-vision'的版本从18.0.0到较低版本。

Try using 17.0.2 or 16.2.0 .尝试使用17.0.216.2.0 You can check for other versions in Google's Maven Repository under com.google.android.gms -> play-services-vision您可以在Google 的 Maven 存储库中的com.google.android.gms -> play-services-vision下查看其他版本

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM