org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_25\bin\java.exe'' finished with non-zero exit value 3

放肆的年华 提交于 2019-12-06 12:06:58

问题


i import one project in my Android studio so my build.gradle file as follows.

build.gradle

apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"

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

dependencies {
compile 'com.android.support:multidex:1.0.0'
compile files('libs/achartengine-1.1.0.jar')
compile files('libs/apache-mime4j-0.6.jar')
compile files('libs/commons-io-2.4.jar')
compile files('libs/droidText.0.2.jar')
compile files('libs/gson-2.1.jar')
compile files('libs/httpmime-4.0.1.jar')
compile files('libs/itextpdf-5.1.0.jar')
compile files('libs/json_simple-1.1.jar')
compile files('libs/opencsv-2.4.jar')
compile files('libs/ormlite-android-4.48.jar')
compile files('libs/ormlite-core-4.48.jar')
compile files('libs/google-play-services.jar')

compile 'com.android.support:appcompat-v7:22.2.0'
}

When i run above project it gave me error like below

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_25\bin\java.exe'' finished with non-zero exit value 3

Any idea how can i solve this problem ?you all suggestion are appreciable


回答1:


In all those dependencies there is one which might be duplicate. Duplicate dependency gives such an error. Try and replace the first line in the dependencies function

compile 'com.android.support:multidex:1.0.0'

with

provided 'com.android.support:multidex:1.0.0'

I am not sure if this will work but something like this worked for me before. Try and delete dependencies which seem duplicate to you



来源:https://stackoverflow.com/questions/31512910/org-gradle-process-internal-execexception-process-command-c-program-files-ja

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!