android - Android Material 和 appcompat Manifest 合并在 react-native 或 ExpoKit 中失败
问题描述
我将 '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-device-info'
以version 2.1.2
修复我的错误。见github.com/facebook/react-native/issues/25294#issuecomment-503024749
简而言之:"services-gcm:+"
作为依赖使用的库,以及最新的gcm版本导致了这个问题。
推荐阅读
- apache-kafka - stackdriver 不监控 kafka 指标
- amazon-web-services - AWSmobile-cli 是否已停产?
- cypress - 赛普拉斯:.each 循环查找具有价值的元素
- c# - 从 C# 到 C++ 封送数据类型的类型转换问题
- dart - Flutter:如何获取文本行数
- javascript - Axios,代理请求似乎不起作用
- ios - 突出显示按钮时如何获取事件而不是状态
- json - 在“加载”后访问 Json 数据
- python - 我想在 python gui 上更新 arduino 数据,但它没有发生,请有人找出问题
- hazelcast - hazelcast 领导人选举以两名领导人结束