繁体   English   中英

Android清单合并失败

[英]Android Manifest Merger failed

我最近更新了我的整个android studio,似乎在下面出现了此错误:

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.

这是我的gradle应用:

    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'

这是我的gradle项目:

    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

更新于昨天在2018年6月20日弹出,它搞砸了所有内容,如果你们能帮助我,将不胜感激,因为我看到一些代码也已经过时了,我在应用程序中使用了很多代码水平。

根据错误日志中的建议,将tools:replace="android:label"添加到AndroidManifest.xml中的<application>标记中。

可能会发生此错误,因为某些jar文件或库的AndroidManifest.xml也可能在其<application>标记中定义了android:label属性,这导致合并冲突,因为清单合并过程无法理解继续哪个android:label

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

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

暂无
暂无

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

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