当我在终端中运行命令 react-native run-android 时 (React-Native),我收到下面提到的错误。
Manifest merger failed : Attribute application@appComponentFactory value=(andr
oid.support.v4.app.CoreComponentFactory) from [com.android.support:support-compa
t:28.0.0] AndroidManifest.xml:22:18-91 is also present at [androidx.core:core:1.1.0-alpha05] AndroidManifest.xm
l:22:18-86 value=(androidx.core.app.CoreComponentFactory).
我尝试按照少数人提出的解决方案从 android.support 迁移到 android x。
Expected Result: Build SuccessFul
Actual Result: BUILD FAILED in 9s
最佳答案
你可以尝试在 gradle.properties
中添加以下内容吗:
android.useAndroidX=true
android.enableJetifier=true
会自动解决google文件与第三方依赖的依赖冲突。
关于android - react native Android : Manifest merger failed,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56661103/