Android Studio-Java.exe 以非零退出值 2 结束 [英] Android Studio-Java.exe is finished with non-zero exit value 2
本文介绍了Android Studio-Java.exe 以非零退出值 2 结束的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我尝试运行我的应用程序时,出现此错误:-
When I try to Run my app, I am getting this error:-
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
更新:- 这是我的 Build.gradle(Module:app) 文件
UPDATED:- Here is my Build.gradle(Module:app) file
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "navigationdrawer.tutecentral.com.navigationdrawer"
minSdkVersion 15
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:appcompat-v7:22.1.1'
}
这是什么意思?
推荐答案
当我将一些类文件重构为一个库项目并且我有一个类文件的重复名称时,这发生在我身上.因此,请仔细检查您没有任何重复的名称.这似乎也是这里问题的重复:android 项目:进程以非零退出值 2 结束
This happened for me when I was refactoring some class files to a library project and I had a duplicate name of a class file. So, double check that you do not have any duplicate names. This also appears to be a duplicate of the question here: android project: process finished with non-zero exit value 2
这篇关于Android Studio-Java.exe 以非零退出值 2 结束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文