任务':app:processDebugManigest'的执行失败 [英] Execution failed for task':app:processDebugManigest'

查看:50
本文介绍了任务':app:processDebugManigest'的执行失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的代码中出现了以下错误代码:

I got this error code in my code:

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

这是我的gradle(项目级别)的样子:

This is how my gradle(project-level) looks like:

android {
   compileSdkVersion 26
   buildToolsVersion "26.0.2"
   defaultConfig {
      applicationId "com.example.mertalptasdelen.chatapp"
      minSdkVersion 16
      targetSdkVersion 26
      versionCode 1
      versionName "1.0"
      testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
   } 

这些是我的项目依赖项:

These are my project dependencies:

compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-core:10.0.1'
testCompile 'junit:junit:4.12'
compile 'com.android.support:design:26.1.0'
compile 'com.firebaseui:firebase-ui:2.4.0'

此外,我阅读了此答案链接执行失败对于任务:app:processDebugManifest Android Studio 2.3.3 ,它与我的错误类似(可能相同),但我无法解决.

Also, I read this answer link Execution failed for task :app:processDebugManifest Android Studio 2.3.3 it's similar to my error(maybe same) but I'm unable to solve it.

推荐答案

问题与firebase-ui库有关.从其文档:

The problem is related with firebase-ui library. From its documentation:

升级依赖项

如果您想使用FirebaseUI的其中一个的较新版本传递依赖项,例如Firebase,Play服务或Android支持库,您需要添加显式编译所有FirebaseUI依赖项的build.gradle中的声明使用您要使用的版本.

If you would like to use a newer version of one of FirebaseUI's transitive dependencies, such as Firebase, Play services, or the Android support libraries, you need to add explicit compile declarations in your build.gradle for all of FirebaseUI's dependencies at the version you want to use.

由于使用了所有 firebase-ui ,因此需要将特定的支持库版本添加到 build.gradle .像这样:

Because you use all of the firebase-ui, you need to add the specific support library version to your build.gradle. Something like this:

//auth:
compile "com.android.support:design:26.1.0"
compile "com.android.support:customtabs:26.1.0"
compile "com.android.support:cardview-v7:26.1.0"

//Database:
compile "com.android.support:recyclerview-v7:26.1.0"
compile "com.android.support:support-v4:26.1.0"

//Storage:
compile "com.android.support:appcompat-v7:26.1.0"
compile "com.android.support:palette-v7:26.1.0"

并且由于您使用的是 firebase-ui:2.4.0 ,因此您需要使用Firebase/Google Play版本的 11.4.0 .因此,将您的Firebase依赖关系更改为11.4.0:

And because you use firebase-ui:2.4.0, you need to use Firebase/Google Play version 11.4.0. So, change your firebase dependency to 11.4.0:

compile 'com.google.firebase:firebase-core:11.4.0'

这篇关于任务':app:processDebugManigest'的执行失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆