java.exe android运行错误,Gradle构建错误:Android java.exe以非零退出值1结束

Vikas Viki

5

java

android

错误仍然存​​在.任何帮助将真正受到赞赏.谢谢!

Information:Gradle tasks [:app:assembleDebug]

:app:preBuild UP-TO-DATE

:app:preDebugBuild UP-TO-DATE

:app:compileDebugNdk UP-TO-DATE

:app:checkDebugManifest

:app:preReleaseBuild UP-TO-DATE

:app:prepareComAndroidSupportAppcompatV72211Library UP-TO-DATE

:app:prepareComAndroidSupportSupportV42211Library UP-TO-DATE

:app:prepareDebugDependencies

:app:compileDebugAidl UP-TO-DATE

:app:compileDebugRenderscript UP-TO-DATE

:app:generateDebugBuildConfig UP-TO-DATE

:app:generateDebugAssets UP-TO-DATE

:app:mergeDebugAssets UP-TO-DATE

:app:generateDebugResValues UP-TO-DATE

:app:generateDebugResources UP-TO-DATE

:app:mergeDebugResources UP-TO-DATE

:app:processDebugManifest UP-TO-DATE

:app:processDebugResources UP-TO-DATE

:app:generateDebugSources UP-TO-DATE

:app:compileDebugJava UP-TO-DATE

:app:preDexDebug FAILED

Error:Execution failed for task ':app:preDexDebug'.

> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_45\bin\java.exe'' finished with non-zero exit value 1

当我使用--debug选项运行时,它会将错误显示为:

Error:05:43:59.724 [ERROR] [org.gradle.BuildExceptionReporter]

05:43:59.725 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.

05:43:59.726 [ERROR] [org.gradle.BuildExceptionReporter]

05:43:59.727 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:

05:43:59.728 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':app:preDexDebug'.

05:43:59.729 [ERROR] [org.gradle.BuildExceptionReporter] > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_45\bin\java.exe'' finished with non-zero exit value 1

05:43:59.732 [ERROR] [org.gradle.BuildExceptionReporter]

05:43:59.733 [ERROR] [org.gradle.BuildExceptionReporter] * Try:

05:43:59.734 [ERROR] [org.gradle.BuildExceptionReporter] Run with --stacktrace option to get the stack trace.

以及build.gradle的内容(Project:MyApplication)

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

repositories {

jcenter()

}

dependencies {

classpath 'com.android.tools.build:gradle:1.1.0'

// NOTE: Do not place your application dependencies here; they belong

// in the individual module build.gradle files

}

}

allprojects {

repositories {

jcenter()

}

}

build.gradle的内容(模块:app):

apply plugin: 'com.android.application'

android {

compileSdkVersion 21

buildToolsVersion "21.1.2"

defaultConfig {

applicationId "com.example.user.myapplication"

minSdkVersion 8

targetSdkVersion 21

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:22.1.1'

}

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值