【发布时间】:2019-06-18 05:40:29
【问题描述】:
我将“android.support:appcompat-v7”更新为28.0.0。
但它带来了构建错误。
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:8:5-23:19 to override.
然后我的 Logcat 中出现此错误:
清单合并失败
我的 app.gradle:
configurations.all {
resolutionStrategy.force 'com.android.support:design:28.0.0'
resolutionStrategy.force "com.android.support:support-v4:28.0.0"
resolutionStrategy.force "com.android.support:support-media-compat:28.0.0"
}
...
dependencies {
implementation 'com.android.support:multidex:1.0.1'
// Our dependencies
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
}
我该如何解决?
我需要你的解决方案。
提前谢谢你。
【问题讨论】:
-
遇到同样的问题....我的应用昨天运行良好,但今天我只运行命令
react-native run-android,剩下的就是历史了。 -
@PatelDhara 不幸的是,没有,如果我有解决方案,我一定会在哪里发布一些内容
-
@PatelDhara 这很棒,你是怎么做到的?你能分享一下解决方案吗?
-
@MDHusnainTahir 我已经分享了我的解决方案作为答案。你可以在下面看到。如果该解决方案对您不起作用,请共享您的 package.json 文件。我可以帮你
标签: android react-native react-native-android expo