Android 如何解决清单合并失败错误
我正在使用firebase构建一个familyGps跟踪器,我发现以下错误:Android 如何解决清单合并失败错误,android,build.gradle,Android,Build.gradle,我正在使用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 presen
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.
这是因为它隐式使用了androidX库,这与支持库28.0.0冲突。您需要将android image cropper版本降级为或在项目中使用androidX。获取此错误:清单合并失败:属性application@appComponentFactory[com.android.support:support compat:28.0.0]AndroidManifest.xml:22:18-91中的value=(android.support.v4.app.CoreComponentFactory)也出现在[androidx.core:core:1.0.0]AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory)。建议:在AndroidManifest.xml:9:5-31:19处的元素中添加'tools:replace=“android:appComponentFactory”'以覆盖。
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'
}