【问题标题】:org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_25\bin\java.exe'' finished with non-zero exit value 3org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_25\bin\java.exe'' 以非零退出值 3 结束
【发布时间】:2015-07-20 09:24:05
【问题描述】:

我在我的 Android 工作室中导入了一个项目,所以我的 build.gradle 文件如下。

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'
}

当我在上面运行项目时,它给了我如下错误

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

知道我该如何解决这个问题吗?你所有的建议都是可观的

【问题讨论】:

  • 尝试将 compile 'com.android.support:multidex:1.0.0' 更改为 provided 'com.android.support:multidex:1.0.0'
  • WisdmLabs:你告诉我的方法是什么?我没有得到
  • 这意味着你从假账户问了问题..

标签: android jar android-gradle-plugin executable-jar


【解决方案1】:

在所有这些依赖项中,有一个可能是重复的。重复依赖会产生这样的错误。 尝试替换依赖函数中的第一行

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

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

我不确定这是否会起作用,但类似的东西以前对我有用。 尝试删除对您来说重复的依赖项

【讨论】:

  • WisdmLabs : 不工作,给出如下错误Error:Execution failed for task ':app:prepareDebugDependencies'. > Dependency Error. See console for details
  • 控制台中的详细信息是什么?
  • WisdmLabs :查看此控制台消息:http://pastie.org/10302160
  • okay.comment 这一行再试一次....编译文件('libs/ormlite-android-4.48.jar')
  • WisdmLabs : 我评论那行但仍然出现相同的错误消息
猜你喜欢
  • 2016-04-02
  • 2021-10-20
  • 1970-01-01
  • 2016-11-05
  • 2015-09-05
  • 2018-08-19
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多