【发布时间】:2019-07-31 20:38:12
【问题描述】:
我正在尝试实施 Google 服务,例如广告和 Firebase。 我为每个工具使用最新版本。
我尝试添加 //noinspection GradleCompatible,更改某些实现的版本并添加工具:replace="android:appComponentFactory to Manifest
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support.constraint:constraint-layout:2.0.0-beta2'
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:support-annotations:28.0.0'
implementation 'android.arch.lifecycle:extensions:1.1.1'
testImplementation 'junit:junit:4.13-beta-3'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.google.android.gms:play-services-ads:18.1.1'
implementation 'com.google.firebase:firebase-core:17.0.1'
implementation 'com.google.android.gms:play-services-auth:17.0.0'
}
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
帮我解决这个错误。
Error: 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:8:5-76:19 to override.
【问题讨论】:
标签: java android android-studio