我正在用firebase构建familyGps跟踪器,但出现以下错误:
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:9:5-31:19 to override.
我的依赖文件包括:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.+'
implementation 'com.google.firebase:firebase-core:16.0.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.firebase:firebase-auth:16.0.2'
implementation "com.google.android.gms:play-services-gcm:10.2.1"
implementation 'com.google.firebase:firebase-messaging:10.2.1'
implementation 'de.hdodenhof:circleimageview:3.0.0'
}
答案 0 :(得分:0)
这是因为android-image-cropper v2.8.0隐式使用了androidX库,该库与支持库28.0.0冲突。您需要将android-image-cropper版本降级为2.7.0或在项目中使用androidX。
答案 1 :(得分:0)
首先。您尝试Dhaiyur的答案。
如果仍然有问题,则必须更改androidX。
检查此URL。