android - 清单合并失败:属性 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'”时,我都会收到此错误:
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.
当我第一次做这个教程时,一切都编译好了,我能够获得进度条,但是当我尝试调试和构建时,它崩溃了。现在,我第二次实现依赖项给了我同样的错误。
PS - 我把它设置为 4.4 - 当前的 android
我查看了“ https://developer.android.com/topic/libraries/support-library/packages ”,当我交叉引用时,似乎我已经包含了 28.0.0 - 我不确定要做什么从这里做。
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'
}
它需要什么支持?我尝试实现工具:替换...但它只是给了我很多错误。
解决方案
这是因为您的项目具有相同库的不同版本 - androidx 和 pre-androidx。在 android studio 工具栏中转到:Refactor-> Migrate to androidX... -> Migrate
推荐阅读
- conda - 我需要多少可用空间才能使用 conda 激活环境?
- asp.net - 如何从 Angular 读取 RFID 卡
- r - select(vore) 有时称为“vore”列,但有时也称为“vore_imp”列
- python - 从 S3 存储桶下载图像并存储在本地变量(boto3)中
- .net - 添加报告下载的进度条(包括源)
- ios - Array(String) 是否分配新空间?
- rpa - 有什么方法可以使用 UiPath 从冗长的 PDF 中提取表格?
- architecture - 为什么 Archimate Elements 有两种符号
- python - Pandas Edgelist 到 NetworkX 权重聚合
- python - 熊猫如何根据条件在groupby中划分行列