AndroidX冲突问题

Android Support库 和 AndroidX库 冲突问题。

在构建编译的时候会提示下面的报错:

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).
Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:6:5-21:19 to override.

按照日志提示添加在<application>标签里面加上:tools:replace="android:appComponentFactory"其实并不是解决方法。

Androidx库 和 Android Support库 是不能共存的。

参考:https://zhuanlan.zhihu.com/p/61895173

参考:https://www.cnblogs.com/tc310/p/12834505.html

posted @ 2021-08-03 16:48  何文西  阅读(230)  评论(0编辑  收藏  举报