【问题标题】:Android : Error:Execution failed for task ':app:processDebugResources' exit with non-Zero Value 1Android:错误:任务':app:processDebugResources'退出执行失败,非零值1
【发布时间】:2016-04-05 05:53:21
【问题描述】:

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

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

Process 'command 'C:\Users\Binil\AppData\Local\Android\sdk\build-tools\22.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 google-maps android-gradle-plugin build.gradle google-maps-api-2


    【解决方案1】:

    将此with-in 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'
    

    【讨论】:

      【解决方案2】:

      在依赖项之后添加应用插件 com.google.gms.google-services

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

      【讨论】:

        猜你喜欢
        • 2016-02-23
        • 2017-05-31
        • 2016-03-24
        • 2015-02-08
        • 2016-08-04
        • 2017-07-23
        • 1970-01-01
        • 2015-08-27
        相关资源
        最近更新 更多