[英]React native Android build error: Manifest merger failed : Attribute application@appComponentFactory
Suddenly got this build error (out of nowhere) which worked well in the morning. 突然出现了此构建错误(无处不在),该错误在早上运行良好。
I tried enabling AndroidX flags, but got ViewCompat class not found issue. 我尝试启用AndroidX标志,但未发现ViewCompat类问题。 So I rolled it back. 所以我回滚了。 I didn't make any changes since yesterday and it had no issues at all until today. 自昨天以来,我没有进行任何更改,直到今天它都没有任何问题。
Is it because of this release ? 是否因为此版本 ?
Would be great if someone could help out. 如果有人可以提供帮助,那就太好了。
* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> 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:7:5-117 to override.
// package.json
"dependencies": {
"accordion-collapse-react-native": "^0.1.9",
"accounting-js": "^1.1.1",
"appcenter": "2.0.0",
"appcenter-analytics": "2.0.0",
"appcenter-crashes": "2.0.0",
"appcenter-push": "2.0.0",
"axios": "^0.18.0",
"fusioncharts": "^3.13.5",
"immutability-helper": "^3.0.0",
"lodash": "^4.17.11",
"lottie-react-native": "^2.5.11",
"moment": "^2.24.0",
"react": "16.8.3",
"react-native": "0.59.8",
"react-native-app-link": "^1.0.0",
"react-native-base64": "0.0.2",
"react-native-camera": "^2.9.0",
"react-native-charts-wrapper": "^0.5.1",
"react-native-check-box": "^2.1.7",
"react-native-code-push": "^5.6.0",
"react-native-device-info": "^2.0.1",
"react-native-elements": "^1.1.0",
"react-native-gesture-handler": "^1.1.0",
"react-native-keyboard-aware-scroll-view": "^0.8.0",
"react-native-material-dropdown": "^0.11.1",
"react-native-modal": "^11.0.1",
"react-native-orientation": "^3.1.3",
"react-native-paper": "^2.15.0",
"react-native-photo-upload": "^1.3.0",
"react-native-picker-select": "^6.1.1",
"react-native-select-input-ios": "^2.0.2",
"react-native-svg": "^9.4.0",
"react-native-svg-uri": "^1.2.3",
"react-native-vector-icons": "^6.4.2",
"react-native-webview": "^5.12.0",
"react-navigation": "^3.8.1",
"react-redux": "^6.0.1",
"redux": "^4.0.1",
"redux-thunk": "^2.3.0"
},
dependencies {
implementation project(':appcenter')
implementation project(':appcenter-crashes')
implementation project(':appcenter-analytics')
implementation project(':react-native-orientation')
implementation project(':react-native-webview')
implementation project(':lottie-react-native')
implementation project(':appcenter-push')
implementation project(':react-native-device-info')
implementation project(':react-native-fs')
implementation project(':react-native-image-resizer')
implementation project(':react-native-image-picker')
implementation project(':react-native-camera')
implementation project(':react-native-code-push')
implementation project(':react-native-svg')
implementation project(':react-native-gesture-handler')
implementation project(':react-native-vector-icons')
implementation 'com.facebook.fresco:animated-gif:1.10.0'
implementation "com.google.android.gms:play-services-base:16.0.1"
implementation ("com.google.firebase:firebase-core:16.0.6")
implementation('com.google.firebase:firebase-messaging:17.3.4')
implementation ('com.google.firebase:firebase-iid:17.0.4') {
force = true
}
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation "com.facebook.react:react-native:+" // From node_modules
}
I just came across the same issue this morning as well. 今天早上我也遇到了同样的问题。
I resolved it by updating both react-native-app-auth
and react-native-device-info
to their latest versions. 我通过将react-native-app-auth
和react-native-device-info
到最新版本来解决此问题。
npm install react-native-app-auth && npm install react-native-device-info
OR 要么
yarn add react-native-app-auth && yarn add react-native-device-info
No need to update to AndroidX. 无需更新到AndroidX。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.