重复资源[style-ldltr-v21 / Base.Widget.AppCompat.Spinner.Underlined]

时间:2017-02-03 23:09:04

标签: android android-gradle android-resources

当我在Android Studio或者intel的想法中创建空的android项目时 我得到同样的错误

Error:Error: Duplicate resources
Error:Execution failed for task ':app:mergeDebugResources'.
[style-ldltr-v21/Base.Widget.AppCompat.Spinner.Underlined]
MyApplication244/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/25.1.1/res/values-ldltr-v21/values-ldltr-v21.xml
[style-ldltr-v21/Base.Widget.AppCompat.Spinner.Underlined]
MyApplication244/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/25.1.1/res/values-ldltr-v21/values-ldltr-v21.xml: Error: Duplicate resources

我的build.gradle(app)文件

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"
    defaultConfig {
        applicationId "com.example.inoob.myapplication244"
        minSdkVersion 19
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

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:25.1.1'
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:design:25.1.1'
}

的build.gradle(MyApplication244)

// Top-level build file where you can add configuration options common to all sub-projects/modules.

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

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

allprojects {
    repositories {
        jcenter()
    }
}

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

我尝试过更改api版本。 21,22,23 但我有同样的问题。 请描述一下它的含义。我是android的新手。

0 个答案:

没有答案