Android : Error:Execution failed for task ':app:processDebugResources' exit with non-Zero Value 1

Android : Error:Execution failed for task ':app:processDebugResources' exit with non-Zero Value 1

重建项目时出现错误。在我为 google Map V2 添加依赖项后,出现此错误。

Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException:  org.gradle.process.internal.ExecException: 

进程“command 'C:\Users\Binil\AppData\Local\Android\sdk\build-tools.0.1\aapt.exe'”以非零退出值 1 完成

我尝试清理项目并重建项目,但同样的问题再次出现。我也尝试同步项目但没有解决

 compile 'com.google.android.gms:play-services:8.4.0'

当我删除此依赖项时,应用程序构建成功。

Gradle.build

apply plugin: 'com.android.application'

android {
compileSdkVersion 22
buildToolsVersion "22.0.1"

defaultConfig {
    applicationId "com.android4dev.navigationview"
    minSdkVersion 15
    targetSdkVersion 22
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.android.support:design:22.2.0'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.google.android.gms:play-services:8.4.0'
}

谁能帮帮我。

将这个内置 android 标签添加到您的模块 build.gradle:

dexOptions {
    javaMaxHeapSize "4g"
}

此外,如果您只想使用地图,请尝试添加此

compile 'com.google.android.gms:play-services-maps:8.4.0'

而不是

compile 'com.google.android.gms:play-services:8.4.0'

添加应用插件 com.google.gms.google-依赖后的服务

dependencies 
{    
compile 'com.google.android.gms:play-services:8.4.0'
}

apply plugin: 'com.google.gms.google-services'