由网友(放肆的笑只为掩饰一切)分享简介:我试着寻找类似的人,并没有解决方案已经奏效。我有previously运行的应用程序没有问题,但我的新的应用程序突然开始给我的问题。当我尝试运行它,称它总是失败:错误:未能执行任务:应用程序:preDexDebug。com.android.ide.common.process.ProcessException:org....
我试着寻找类似的人,并没有解决方案已经奏效。我有previously运行的应用程序没有问题,但我的新的应用程序突然开始给我的问题。当我尝试运行它,称它总是失败:
错误:未能执行任务:应用程序:preDexDebug。
com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:处理'命令'C: Program Files文件(x86)的的Java jdk1.7.0_67 斌 java.exe的''完成非零退出值1
下面显示的内容控制台:
执行任务:[:应用程序:assembleDebug]
配置上的需求是一个孵化功能。
:应用程序:preBuild UP-TO-DATE
:应用程序:preDebugBuild UP-TO-DATE
:应用程序:compileDebugNdk UP-TO-DATE
:应用程序:checkDebugManifest
:应用程序:preReleaseBuild UP-TO-DATE
:应用程序:prepareComAndroidSupportSupportV42200Library UP-TO-DATE
:应用程序:prepareDebugDependencies
:应用程序:compileDebugAidl UP-TO-DATE
:应用程序:compileDebugRenderscript UP-TO-DATE
:应用程序:generateDebugBuildConfig UP-TO-DATE
:应用程序:generateDebugAssets UP-TO-DATE
:应用程序:mergeDebugAssets UP-TO-DATE
:应用程序:generateDebugResValues UP-TO-DATE
:应用程序:generateDebugResources UP-TO-DATE
:应用程序:mergeDebugResources UP-TO-DATE
:应用程序:processDebugManifest UP-TO-DATE
:应用程序:processDebugResources UP-TO-DATE
:应用程序:generateDebugSources UP-TO-DATE
:应用程序:compileDebugJava UP-TO-DATE
:应用程序:preDexDebug
AGPBI:{种:简单,文:错误:无法创建Java虚拟机。,位置:{},原:错误:无法创建Java虚拟机。 }
AGPBI:{种:简单,文:错误:发生了致命的异常程序将退出。,位置:{},原:错误:发生了致命的异常。程序将退出。}
AGPBI:{种:简单,文:错误:无法创建Java虚拟机。,位置:{},原:错误:无法创建Java虚拟机。 }
AGPBI:{种:简单,文:错误:发生了致命的异常程序将退出。,位置:{},原:错误:发生了致命的异常。程序将退出。}
失败
失败:建立失败,一个例外。
* 什么地方出了错:
执行失败的任务:应用程序:preDexDebug。
com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:处理'命令'C: Program Files文件(x86)的的Java jdk1.7.0_67 斌 java.exe的''完成非零退出值1
* 尝试:
与--stacktrace选项获取堆栈跟踪运行。与--info或--debug选项运行,以获得更多的日志输出。
构建失败
总时间:2.614秒
AGPBI:{种:简单,文:错误:无法创建Java虚拟机。,位置:{},原:错误:无法创建Java虚拟机。 }
AGPBI:{种:简单,文:错误:发生了致命的异常程序将退出。,位置:{},原:错误:发生了致命的异常。程序将退出。}
这个应用程序是非常简单的,我还没有从股市的布局改变了它了。它仅用于棒棒糖设计并仅使用库存特征。这里是build.gradle:
应用插件:com.android.application
安卓{
compileSdkVersion 22
buildToolsVersion22.0.0
defaultConfig {
的applicationIDcom.package.app
的minSdkVersion 21
targetSdkVersion 22
版本code 1
VERSIONNAME1.0
}
buildTypes {
推出 {
minifyEnabled假
proguardFiles getDefaultProguardFile('ProGuard的-android.txt'),'proguard-rules.pro
}
}
}
依赖{
编译文件树(导演:库,包括:['的* .jar'])
编译com.android.support:support-v4:22.0.0
}
解决方案
这一定是我的Java中的一个问题,请安装。我删除的Java的所有痕迹,并重新安装,现在它工作正常。
I've tried looking at similar ones and no solution has worked. I've previously run apps without a problem but my new app suddenly started giving me problems. It always fails when I try to run it saying:
Error:Execution failed for task ':app:preDexDebug'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:Program Files (x86)Javajdk1.7.0_67binjava.exe'' finished with non-zero exit value 1
Here is what the console displayed:
Executing tasks: [:app:assembleDebug]
Configuration on demand is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:compileDebugNdk UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportSupportV42200Library 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
AGPBI: {"kind":"SIMPLE","text":"Error: Could not create the Java Virtual Machine.","position":{},"original":"Error: Could not create the Java Virtual Machine."}
AGPBI: {"kind":"SIMPLE","text":"Error: A fatal exception has occurred. Program will exit.","position":{},"original":"Error: A fatal exception has occurred. Program will exit."}
AGPBI: {"kind":"SIMPLE","text":"Error: Could not create the Java Virtual Machine.","position":{},"original":"Error: Could not create the Java Virtual Machine."}
AGPBI: {"kind":"SIMPLE","text":"Error: A fatal exception has occurred. Program will exit.","position":{},"original":"Error: A fatal exception has occurred. Program will exit."}
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:preDexDebug'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:Program Files (x86)Javajdk1.7.0_67binjava.exe'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 2.614 secs
AGPBI: {"kind":"SIMPLE","text":"Error: Could not create the Java Virtual Machine.","position":{},"original":"Error: Could not create the Java Virtual Machine."}
AGPBI: {"kind":"SIMPLE","text":"Error: A fatal exception has occurred. Program will exit.","position":{},"original":"Error: A fatal exception has occurred. Program will exit."}
This app is very simple and I have not changed it much from the stock layout. It is designed only for lollipop and uses only stock features. Here is the build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.0"
defaultConfig {
applicationId "com.package.app"
minSdkVersion 21
targetSdkVersion 22
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:support-v4:22.0.0'
}
解决方案
It must have been a problem with my Java install. I removed all traces of Java and reinstalled and now it works fine.
相关推荐
最新文章