Reputation: 2296
I am getting this error while running the app.And this happens only few times.i am not getting what is causing problem.Can anybody provide me solution?the error is given below.
'command 'C:\Program Files\Java\jdk1.8.0_40\bin\java.exe'' finished with non-zero exit value 2
and my build.gragle file apply plugin: 'com.android.application'
android { compileSdkVersion 23 buildToolsVersion "23.0.1"
}
defaultConfig {
applicationId "com.eagleeye.retailapp"
minSdkVersion 14
targetSdkVersion 22
multiDexEnabled true
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile files('libs/acra-4.6.1.jar')
compile files('libs/itext-pdfa-5.5.6.jar')
compile files('libs/itextpdf-5.5.6.jar')
compile files('libs/nineoldandroids-2.4.0.jar')
compile files('libs/poi-3.11-20141221.jar')
compile files('libs/ProwessPride_V1.01.jar')
compile files('libs/org.apache.http.legacy.jar')
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.android.support:palette-v7:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.yqritc:recyclerview-flexibledivider:1.2.6'
compile 'com.loopj.android:android-async-http:1.4.9'
compile 'com.android.support:support-annotations:23.1.1'
compile 'com.github.bumptech.glide:glide:3.5.2'
}
and my java runtime environment is set to java1.8.0 Please somebody help me.I am having a deployment date near.
Upvotes: 1
Views: 207
Reputation: 2296
dexOptions { incremental true javaMaxHeapSize "4g"}
This solve my problem.Put this in gradle.build
Upvotes: 2
Reputation: 1210
I had this problem once and it was caused by exceeding the 65K methods dex limit. Try to clean your project and remove unused libraries.
Upvotes: 1