错误:未能执行任务:应用程序:dexDebug
。com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:处理'命令'C:\ Program Files文件\的Java \ jdk1.8.0_40 \斌\ java.exe的''完成非零退出值2
我找遍了所有类似的问题和解决方案,但他们没有帮助。希望高手都喜欢你来了。
该项目code已被上传到到位桶:https://tainule@bitbucket.org/tainule/numad-huizhang.git
我有两个模块,应用程序和端点。下面是从模块:应用程序:
应用插件:com.android.application
安卓{
compileSdkVersion 21
buildToolsVersion21.1.2
defaultConfig {
的applicationIDedu.neu.madcourse.huizhang1
的minSdkVersion 14
targetSdkVersion 21
版本code 3
VERSIONNAME2.1
// multiDexEnabled真
}
buildTypes {
推出 {
minifyEnabled假
proguardFiles getDefaultProguardFile('ProGuard的-android.txt'),'proguard-rules.pro
}
}
}
依赖{
编译文件树(包括:['的* .jar'],DIR:库)
编译com.android.support:appcompat-v7:21.0.+
编译com.google.android.gms:播放服务:+
编译com.google.guava:番石榴:18.0'
编译com.google code.gson:GSON:1.7.2
编译org.apache.httpcomponents:httpmime:4.4-β1
编译org.apache.httpcomponents:HttpClient的:4.4-β1
编译org.apache.httpcomponents:的HttpCore:4.4-β1
编译com.nostra13.universalimageloader:通用图像装载机:1.9.3
编制项目(路径:':终点,配置:Android的终端)
编译文件(钢骨混凝土/主/ RES /库/ KeyValueAPI.jar)
}
下面是模块端点:
buildscript {
库{
mavenLocal()
mavenCentral()
}
依赖{
类路径com.google.appengine:摇篮-AppEngine上 - 插件:1.9.17
}
}
库{
mavenCentral();
}
应用插件:Java的
应用插件:战争
应用插件:应用引擎
sourceCompatibility = 1.7
targetCompatibility = 1.7
依赖{
appengineSdkcom.google.appengine:AppEngine上-java的SDK:1.9.8
编译com.google.appengine:AppEngine上-端点:1.9.8
编译com.google.appengine:应用服务引擎功能的终端,DEPS:1.9.8
编译的javax.servlet:servlet的API:2.5
编译com.google code.objectify:物化:4.0b3
编译com.ganyo:GCM服务器:1.0.2
//编译com.github.fengdai:alertdialogpro主题材料:0.1.0
}
应用程序引擎{
downloadSdk =真
下,appcfg {
oauth2 =真
}
端点{
getClientLibsOnBuild =真
getDiscoveryDocsOnBuild =真
}
}
:番石榴:18.0 com.google.guava编译com.google.guava:番石榴JDK5:解决方案
最后,我通过更改编译解决了这个问题17.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.8.0_40\bin\java.exe'' finished with non-zero exit value 2
I searched all the similar questions and solutions, but they do not help. I hope experts like you come up.
The project code has been uploaded into bitbucket: https://tainule@bitbucket.org/tainule/numad-huizhang.git
I have two modules, app and endpoint. Below is from Module:app:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "edu.neu.madcourse.huizhang1"
minSdkVersion 14
targetSdkVersion 21
versionCode 3
versionName "2.1"
// multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile "com.android.support:appcompat-v7:21.0.+"
compile 'com.google.android.gms:play-services:+'
compile 'com.google.guava:guava:18.0'
compile 'com.google.code.gson:gson:1.7.2'
compile 'org.apache.httpcomponents:httpmime:4.4-beta1'
compile 'org.apache.httpcomponents:httpclient:4.4-beta1'
compile 'org.apache.httpcomponents:httpcore:4.4-beta1'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.3'
compile project(path: ':endpoint', configuration: 'android-endpoints')
compile files('src/main/res/libs/KeyValueAPI.jar')
}
Below is from Module endpoint:
buildscript {
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
classpath 'com.google.appengine:gradle-appengine-plugin:1.9.17'
}
}
repositories {
mavenCentral();
}
apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'appengine'
sourceCompatibility = 1.7
targetCompatibility = 1.7
dependencies {
appengineSdk 'com.google.appengine:appengine-java-sdk:1.9.8'
compile 'com.google.appengine:appengine-endpoints:1.9.8'
compile 'com.google.appengine:appengine-endpoints-deps:1.9.8'
compile 'javax.servlet:servlet-api:2.5'
compile 'com.googlecode.objectify:objectify:4.0b3'
compile 'com.ganyo:gcm-server:1.0.2'
// compile 'com.github.fengdai:alertdialogpro-theme-material:0.1.0'
}
appengine {
downloadSdk = true
appcfg {
oauth2 = true
}
endpoints {
getClientLibsOnBuild = true
getDiscoveryDocsOnBuild = true
}
}
解决方案
Finally I solved this problem by changing compile 'com.google.guava:guava:18.0 ' to compile 'com.google.guava:guava-jdk5:17.0'