简体   繁体   English

Android:我抓取我的项目时出现清单合并错误

[英]Android : Getting manifest merge error when I gradle my project

Error:Execution failed for task ':app:processDebugManifest'. 错误:任务':app:processDebugManifest'的执行失败。

Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(26.0.1) from [com.android.support:design:26.0.1] AndroidManifest.xml:28:13-35 is also present at [com.android.support:recyclerview-v7:26.1.0] AndroidManifest.xml:25:13-35 value=(26.1.0). 清单合并失败:[com.android.support:design:26.0.1]中的属性meta-data#android.support.VERSION@value value =(26.0.1)来自AndroidManifest.xml:28:13-35 [com.android.support:recyclerview-v7:26.1.0] AndroidManifest.xml:25:13-35 value =(26.1.0)。 Suggestion: add 'tools:replace="android:value"' to element at AndroidManifest.xml:26:9-28:38 to override. 建议:在AndroidManifest.xml:26:9-28:38的元素上添加'tools:replace =“ android:value”'以进行覆盖。

and build.gradle file is 和build.gradle文件是

  android { compileSdkVersion 26
    buildToolsVersion "26.0.1"
    defaultConfig {
        applicationId "com.example.bhatti.testapplication"
        minSdkVersion 14
        targetSdkVersion 26
        multiDexEnabled = true
        jackOptions {
            enabled true}
       ...}
    ....} compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }}

     dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile project(':chat-sdk-ui')
    compile 'com.android.support:appcompat-v7:26.+'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.android.support:recyclerview-v7:26.+'
    testCompile 'junit:junit:4.12'
        compile 'com.google.android.gms:play-services:10.2.6'
}
apply plugin: 'com.google.gms.google-services'

Use same SDK version for all the dependencies 对所有dependencies使用相同的SDK版本

 android { compileSdkVersion 27
            defaultConfig {
            applicationId "com.example.bhatti.testapplication"
            minSdkVersion 15
            targetSdkVersion 27
            multiDexEnabled = true
            jackOptions {
                enabled true}
           ...}
        ....} compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_8
            targetCompatibility JavaVersion.VERSION_1_8
        }}

         dependencies {
        implementation fileTree(include: ['*.jar'], dir: 'libs')
        androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
            exclude group: 'com.android.support', module: 'support-annotations'
        })
        implementation project(':chat-sdk-ui')
        implementation 'com.android.support:appcompat-v7:27.1.0'
        implementation 'com.android.support.constraint:constraint-layout:1.0.2'
        implementation 'com.android.support:recyclerview-v7:27.1.0'
        testCompile 'junit:junit:4.12'
        implementation 'com.google.android.gms:play-services:12.0.1'
    }
    apply plugin: 'com.google.gms.google-services'

change 更改

compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support:recyclerview-v7:26.+'

to

com.android.support:appcompat-v7:26.0.1'
compile 'com.android.support:recyclerview-v7:26.0.1'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 当我运行旧的android项目时,我从build.gradle收到一条错误消息 - When I run my old android project I get a error message from the build.gradle 当我将Gradle用于Android应用程序时出现“合并不兼容”错误 - Got “ merge incompatible” error when I use Gradle for an Android Application 为什么我在 flutter android 项目中收到 gradle 错误? - Why I am getting gradle error in flutter android project? 当我尝试安装我的Android应用时清单错误 - Error in manifest when i try to install my android app 尝试将 Firebase 添加到我的 android 项目时出现 gradle 同步错误 JAVA_LETTER_OR_DIGIT - I have a gradle sync error JAVA_LETTER_OR_DIGIT when trying to add Firebase to my android project Android 尝试构建项目时出现清单错误 - Android Manifest error when trying to build project 我的Android项目中不断出现错误 - I keep getting an error in my android project 为什么在应用 firebase 和 google 身份验证库时会出现 Manifest 合并错误 - why am i getting Manifest merge error when apply firebase and google authentication libraries 构建我的Android项目时无法合并dex错误 - Unable to merge dex error when building my android project React Native - gradle,清单合并错误 - React Native - gradle, manifest merge error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM