突然出现了这个构建错误(不知从何而来),它在早上运行良好。
我尝试启用 AndroidX 标志,但发现 ViewCompat 类未找到问题。所以我把它回滚了。从昨天开始我没有做任何改变,直到今天它完全没有问题。
是因为这个版本吗?
如果有人能帮忙就好了。
* 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
}