清单合并失败:属性application @ appComponentFactory ... Android Studio 3.2 [英] Manifest merger failed : Attribute application@appComponentFactory...Android Studio 3.2

查看:1901
本文介绍了清单合并失败:属性application @ appComponentFactory ... Android Studio 3.2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在关注本教程: https://www.youtube.com/watch? v = xtElLuzjA0U

我正在使用Android Studio 3.2.1-每当我实现实现'me.zhanghai.android.materialprogressbar:library:1.6.1'"时,都会出现此错误:

I'm using Android Studio 3.2.1 - Whenever I implement "implementation 'me.zhanghai.android.materialprogressbar:library:1.6.1'" I get this error:

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.1] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
 Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> 
element at AndroidManifest.xml:5:5-22:19 to override.

当我第一次学习本教程时,所有内容都经过编译,我能够获得进度条,但是当我尝试调试和构建时,它崩溃了.现在,我第二次实现依赖关系会给我同样的错误.

When I first did this tutorial, everything compiled and I was able to acquire the progress bar, but when I tried debugging and building, it crashed. Now, my second time around, implementing the dependency gives me the same error.

PS-我将其设置为4.4-当前的android

PS - I have it set to 4.4 - current android

我看过" https://developer.android.com /topic/libraries/support-library/packages ",当我进行交叉引用时,似乎已经包含28.0.0了-我不确定从这里开始怎么做.

I've looked at "https://developer.android.com/topic/libraries/support-library/packages" and when I cross reference, it seems I'm already including 28.0.0 - I'm not sure what to do from here.

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:28.0.0'

testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

/*third party  library*/
implementation 'me.zhanghai.android.materialprogressbar:library:1.6.1'

}

需要什么支持?我尝试实现tools:replace ...但是它给了我很多错误.

What support does it need? I tried implementing tools:replace...But it just gives me a slew of errors.

推荐答案

这是因为您的项目具有相同库的不同版本-androidx和androidx之前的版本. 在android studio工具栏中,转到:Refactor-> Migrate to androidX... -> Migrate

Its because your project has different versions of the same library - androidx and pre-androidx. In android studio tool bar go to: Refactor-> Migrate to androidX... -> Migrate

这篇关于清单合并失败:属性application @ appComponentFactory ... Android Studio 3.2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆