簡體   English   中英

完成以非零退出值2-Android Gradle

[英]finished with non-zero exit value 2 - Android Gradle

請任何人可以幫助我,當我運行我的android應用程序時出現問題,顯示此錯誤:

`Error:Execution failed for task ':app: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'' finished with non-zero exit value 2`

我使用android studio 1.2.3

應用程序build.gradle是這樣的:

    apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"


    defaultConfig {
        applicationId "com.example.hp.scan"
        minSdkVersion 19
        targetSdkVersion 23
        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:23.1.1'
    compile 'org.apache.httpcomponents:httpcore:4.1.2'
    compile files('libs/apache-httpcomponents-httpclient.jar')
}

謝謝。

我認為您應該安裝較新版本的jdk,刪除當前的jdk並安裝較新的版本。 希望對您有所幫助。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM