编译SDK版本出错?

时间:2016-04-25 06:39:53

标签: android android-studio android-gradle

任何人都可以告诉我如何解决此错误:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 21
    buildToolsVersion '21.1.2'
    defaultConfig {
        applicationId "com.example.abhishek.detector"
        minSdkVersion 10
        targetSdkVersion 21
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.0'
    compile 'com.android.support:design:23.1.0'
    compile 'com.google.android.gms:play-services-location:8.1.0'
}

错误: 错误:任务':app:processDebugResources'执行失败。

  

com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:进程'命令' C:\ Users \ hp-pc \ AppData \ Local \ Android \ SDK \构建工具\ 21.1.2 \ aapt.exe''完成非零退出值1

2 个答案:

答案 0 :(得分:1)

安装最新版本的构建工具。调整build.gradle以使用

`buildToolsVersion "23.0.2"`

或检查并删除列表中的重复依赖项。

享受:)

答案 1 :(得分:1)

从values / string.xml

更改sdk版本
相关问题