java.exe的完成非零值2 [英] java.exe finished with non-zero exit value 2
问题描述
我的previous播放服务的版本是87年6月5日,我升级到7.0.0,然后得到这个错误
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException:进程命令 C:\ Program Files文件\的Java \ jdkx.x.x_xx \ BIN \ java.exe的''与完成 非零值2
编译com.google.android.gms:玩-服务:87年6月5日
我已经升级发挥服务的话....现在我的摇篮是
相关性{
编制项目(:com_facebook_android)
编制项目(:pullToRefreshLib)
编制项目(:smoothProgressbarLib)
编制项目(:progressMaterial)
编译com.android.support:support-v4:22.0.0
编译com.google.android.gms:播放服务:7.0.0
编译com.google code.gson:GSON:2.3
编译com.jakewharton:butterknife:6.1.0
编译文件(库/ Android的异步HTTP-1.4.6.jar)
编译文件(库/公共-IO-2.4.jar)
编译文件(库/谷歌-API客户端1.4.1-beta.jar)
编译文件(库/谷歌API的客户googleapis-1.4.1-beta.jar)
编译文件(库/杰克逊核心-ASL-1.6.7.jar)
编译文件(库/ jeval.jar)
编译文件(库/ jscience.jar)
编译文件(库/ libGoogleAnalyticsV2.jar)
编译文件(库/ nineoldandroids-2.4.0.jar)
编译文件(库/通用图像装载-1.9.3.jar)
编译文件(库/ YouTubeAndroidPlayerApi.jar)
编译文件(库/番石榴r09.jar)
有没有冲突库?
没有人接听。我发现....解决的办法是multidex
公共类MyApplication的扩展MultiDexApplication {
@覆盖
保护无效attachBaseContext(上下文基地){
super.attachBaseContext(基峰);
MultiDex.install(本);
}
}
在menifest文件
<应用
机器人:MyApplication的NAME =
机器人:allowBackup =真
机器人:图标=@可绘制/ app_icon
机器人:标签=@字符串/ APP_NAME
机器人:largeHeap =真
机器人:主题=@风格/ Theme.MyAppTheme>
我的摇篮文件
安卓{
compileSdkVersion 21
buildToolsVersion22.0.1
defaultConfig {
的applicationIDcom.winapp
的minSdkVersion 14
targetSdkVersion 21
multiDexEnabled =真
}
buildTypes {
推出 {
minifyEnabled假
proguardFiles getDefaultProguardFile('ProGuard的-android.txt'),'ProGuard的-rules.txt
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
packagingOptions {
不包括META-INF / NOTICE.txt
不包括META-INF / LICENSE.TXT
}
dexOptions {
preDexLibraries = FALSE
增量真
javaMaxHeapSize4G
}
afterEvaluate {
tasks.matching {
it.name.startsWith(DEX)
} {。每个DX - >
如果(dx.additionalParameters == NULL){
dx.additionalParameters = ['--multi-DEX']
} 其他 {
dx.additionalParameters + ='--multi-DEX
}
}
}
}
My previous play service version is 6.5.87 and I upgraded to 7.0.0 then Got this error
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdkx.x.x_xx\bin\java.exe'' finished with non-zero exit value 2
compile 'com.google.android.gms:play-services:6.5.87'
I have upgraded play service Then....Now my gradle is
dependencies {
compile project(':com_facebook_android')
compile project(':pullToRefreshLib')
compile project(':smoothProgressbarLib')
compile project(':progressMaterial')
compile 'com.android.support:support-v4:22.0.0'
compile 'com.google.android.gms:play-services:7.0.0'
compile 'com.google.code.gson:gson:2.3'
compile 'com.jakewharton:butterknife:6.1.0'
compile files('libs/android-async-http-1.4.6.jar')
compile files('libs/commons-io-2.4.jar')
compile files('libs/google-api-client-1.4.1-beta.jar')
compile files('libs/google-api-client-googleapis-1.4.1-beta.jar')
compile files('libs/jackson-core-asl-1.6.7.jar')
compile files('libs/jeval.jar')
compile files('libs/jscience.jar')
compile files('libs/libGoogleAnalyticsV2.jar')
compile files('libs/nineoldandroids-2.4.0.jar')
compile files('libs/universal-image-loader-1.9.3.jar')
compile files('libs/YouTubeAndroidPlayerApi.jar')
compile files('libs/guava-r09.jar')
Is there any conflict library?
No one answered. I found.... The solution is multidex
public class MyApplication extends MultiDexApplication {
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}
}
in menifest file
<application
android:name=".MyApplication"
android:allowBackup="true"
android:icon="@drawable/app_icon"
android:label="@string/app_name"
android:largeHeap="true"
android:theme="@style/Theme.MyAppTheme">
My gradle file
android {
compileSdkVersion 21
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.winapp"
minSdkVersion 14
targetSdkVersion 21
multiDexEnabled = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
packagingOptions {
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/LICENSE.txt'
}
dexOptions {
preDexLibraries = false
incremental true
javaMaxHeapSize "4g"
}
afterEvaluate {
tasks.matching {
it.name.startsWith('dex')
}.each { dx ->
if (dx.additionalParameters == null) {
dx.additionalParameters = ['--multi-dex']
} else {
dx.additionalParameters += '--multi-dex'
}
}
}
}
这篇关于java.exe的完成非零值2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!