android项目:进程以非零退出值2完成 [英] android project: process finished with non-zero exit value 2

查看:27
本文介绍了android项目:进程以非零退出值2完成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法编译我的 android 项目.谷歌和其他 SO 帖子告诉我它(可能)与依赖关系有关,但我找不到在哪里.这是错误:

I'm unable to compile my android project. Google and other SO posts tell me it (probably) has something to do with dependencies, but I can't find where. Here's the error:

Error:Gradle: Execution failed for task ':app:dexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:Program FilesJavajdk1.7.0_79injava.exe'' finished with non-zero exit value 2

还有我的 gradle 文件:

and my gradle file:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.2"

    defaultConfig {
        applicationId "com.example.skate.socialskate"

        minSdkVersion 21
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.google.android.gms:play-services:7.3.0'
    compile 'com.google.apis:google-api-services-youtube:v3-rev136-1.20.0'
    compile 'com.android.support:cardview-v7:22.1.0'
    compile 'com.android.support:recyclerview-v7:21.0.+'
    compile 'de.hdodenhof:circleimageview:1.2.1'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.fasterxml.jackson.core:jackson-databind:2.2.+'
    compile 'com.fasterxml.jackson.core:jackson-core:2.2.+'
    compile 'com.fasterxml.jackson.core:jackson-annotations:2.2.+'
    compile 'org.jsoup:jsoup:1.8.2'
    compile 'com.github.shell-software:fab:1.1.0'
    compile 'com.google.api-client:google-api-client:1.18.0-rc'



}

推荐答案

这发生在我将一些类文件重构为库项目时,我有一个类文件的重复名称.因此,请仔细检查您是否有任何重复的名称.

This happened for me when I was refactoring some class files to a library project and I had a duplicate name of a class file. So, double check that you do not have any duplicate names.

这篇关于android项目:进程以非零退出值2完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆