Java com.android.ide.common.process.ProcessException:process';以非零退出值2结束

Java com.android.ide.common.process.ProcessException:process';以非零退出值2结束,java,android,build.gradle,Java,Android,Build.gradle,我的问题是,在向build.gradle添加路径时,我无法运行代码 下面是我的build.gradle文件 apply plugin: 'android' dependencies { compile fileTree(dir: 'libs', include: '*.jar') compile project(':android-auto-scroll-view-pager-master 2') compile project(':android-mapviewbal

我的问题是,在向build.gradle添加路径时,我无法运行代码

下面是我的build.gradle文件

apply plugin: 'android'

dependencies {
    compile fileTree(dir: 'libs', include: '*.jar')
    compile project(':android-auto-scroll-view-pager-master 2')
    compile project(':android-mapviewballoons')
    compile project(':android-newpopupmenu-lib')
    compile project(':android-support-v7-appcompat-master')
    compile project(':ImageViewTouch')
    compile project(':pulltorefresh')
    compile files('libs/picasso-2.5.2.jar')
    compile "com.google.android.gms:play-services-gcm:8.4.0"

}

android {
    compileSdkVersion 20
    buildToolsVersion "23.0.2"

    packagingOptions {
        exclude 'META-INF/DEPENDENCIES.txt'
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/dependencies.txt'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/LGPL2.1'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/notice.txt'
    }


    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
            resources.srcDirs = ['src']
            aidl.srcDirs = ['src']
            renderscript.srcDirs = ['src']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
        }

        // Move the tests to tests/java, tests/res, etc...
        instrumentTest.setRoot('tests')

        // Move the build types to build-types/<type>
        // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
        // This moves them out of them default location under src/<type>/... which would
        // conflict with src/ being used by the main source set.
        // Adding new build types or product flavors should be accompanied
        // by a similar customization.
        debug.setRoot('build-types/debug')
        release.setRoot('build-types/release')
    }
}
apply插件:“安卓”
依赖关系{
编译文件树(目录:“libs”,包括:“*.jar”)
编译项目(':android自动滚动查看寻呼机主控程序2')
编译项目(“:android MapViewBallobs”)
编译项目(“:android newpopupmenu库”)
编译项目(“:android-support-v7-appcompat-master”)
编译项目(“:ImageViewTouch”)
编译项目(“:pulltorefresh”)
编译文件('libs/picasso-2.5.2.jar')
编译“com.google.android.gms:play services gcm:8.4.0”
}
安卓{
编译DK20版
buildToolsVersion“23.0.2”
包装选项{
排除“META-INF/DEPENDENCIES.txt”
排除“META-INF/依赖项”
排除“META-INF/dependencies.txt”
排除“META-INF/LICENSE.txt”
排除“META-INF/许可证”
排除“META-INF/license.txt”
排除“META-INF/LGPL2.1”
排除“META-INF/NOTICE.txt”
排除“META-INF/通知”
排除“META-INF/notice.txt”
}
源集{
主要{
manifest.src文件“AndroidManifest.xml”
java.srcDirs=['src']
resources.srcDirs=['src']
aidl.srcDirs=['src']
renderscript.srcDirs=['src']
res.srcDirs=['res']
assets.srcDirs=['assets']
}
//将测试移动到tests/java、tests/res等。。。
instrumentTest.setRoot('tests'))
//将生成类型移动到生成类型/
//例如,build-types/debug/java、build-types/debug/AndroidManifest.xml。。。
//这会将它们移出src/…下的默认位置,这将
//与主源集正在使用的src/冲突。
//应同时添加新的构建类型或产品风格
//通过类似的定制。
setRoot('build-types/debug')
setRoot('build-types/release')
}
}
我得到的错误是:

错误:任务“:XXX:dexDebug”的执行失败

com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:process'command'C:\Program Files\Java\jdk1.7.0_79\bin\Java.exe''以非零退出值2结束

我不知道build.gradle有什么问题


请帮我解决这个问题。

在gradle中尝试以下代码:

 packagingOptions {
        exclude 'META-INF/DEPENDENCIES.txt'
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/dependencies.txt'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/LGPL2.1'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/notice.txt'
    }

在gradle配置中声明多索引支持

defaultConfig {        
    // Enabling multidex support.
    multiDexEnabled true
}