简体   繁体   中英

Android Manifest Merger failed

I recently updated my entire android studio and i seem to get this error below:

Manifest merger failed : Attribute application@label value=(Curtain Club) from AndroidManifest.xml:13:9-37
is also present at [de.codecrafters.tableview:tableview:2.2.0] AndroidManifest.xml:11:18-50 value=(@string/app_name).
Suggestion: add 'tools:replace="android:label"' to <application> element at AndroidManifest.xml:10:5-140:19 to override.

Here is my gradle app:

    apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    buildToolsVersion '27.0.3'
    defaultConfig {
        applicationId "Calculator.curtainclub"
        minSdkVersion 23
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"


    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation 'com.android.support:wear:27.1.0'
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:27.1.0'
    compile 'com.android.support:design:27.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    testCompile 'junit:junit:4.12'
    compile project(':jtds-1.3.1')
    androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
    androidTestCompile 'com.android.support.test:runner:0.5'
    androidTestCompile 'com.android.support:support-annotations:23.1.1'
    compile files('libs/mail.jar')
    compile files('libs/additionnal.jar')
    compile files('libs/activation.jar')

    compile 'com.android.support:recyclerview-v7:27.1.0'
    api 'de.codecrafters.tableview:tableview:2.2.0'

and here is my gradle project:

    buildscript {
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.3'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
        google()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir

The update popped up yesterday on the 20th of June 2018 and it messed up everything, it would be highly appreciated if you guys can help me out because i seen some code has become obsolete also which i have used a lot of in my gradle on app level.

Add tools:replace="android:label" to your <application> tag in AndroidManifest.xml as suggested in error logs.

This error might have occurred because AndroidManifest.xml of some jar file or library might also be having the android:label attribute defined in its <application> tag which is causing merger conflict as manifest merging process could not understand which android:label to continue with.

在清单文件中添加uses-SDK工具

 <uses-sdk tools:replace="android:label" />

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM