gpt4 book ai didi

android manifest 合并失败,gms play services/firebase

转载 作者:IT老高 更新时间:2023-10-28 23:01:43 27 4
gpt4 key购买 nike

我正在尝试使用 firebaseUI 将 firebase 添加到我的应用中。 As the documentations says, I have used the corresponding gms:play-services (11.0.4) with the firebaseUI version (2.2.0)当我同步 gradle 文件时,我收到以下错误:

Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(26.0.0) from [com.android.support:support-v13:26.0.0] AndroidManifest.xml:28:13-35
is also present at [com.android.support:customtabs:25.4.0] AndroidManifest.xml:25:13-35 value=(25.4.0).
Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:26:9-28:38 to override.

这是我的 gradle 文件:

android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.test.test"
minSdkVersion 21
targetSdkVersion 25
versionCode 1
versionName "1.0"
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])


compile 'com.android.support:appcompat-v7:26.0.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:cardview-v7:26.0.0'
compile 'com.android.support:support-v13:26.0.0'
compile 'com.android.support:design:26.0.0'
compile 'com.android.support:recyclerview-v7:26.0.0'

//firebase
compile 'com.google.android.gms:play-services-auth:11.0.4'
compile 'com.google.firebase:firebase-core:11.0.4'
compile 'com.google.firebase:firebase-auth:11.0.4'
compile 'com.google.firebase:firebase-database:11.0.4'
compile 'com.google.firebase:firebase-storage:11.0.4'
compile 'com.firebaseui:firebase-ui:2.2.0'

testCompile 'junit:junit:4.12'
}

//firebase
apply plugin: 'com.google.gms.google-services'

我已确保所有版本都是最新的并且它们都是相同的。不知道是什么问题?

最佳答案

我通过添加解决了这个问题:

    configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '26.0.0'
}
}
}
}

from here.

工具提示建议将 tools:replace="android:value"' 添加到元数据,但这会引发另一个错误,所以我使用上面的解决方案

关于android manifest 合并失败,gms play services/firebase,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45553058/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com