簡體   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