I use the following libraries in build.gradle (app), and there some libraries in libs folder such as: "Arcgis SDK and ksoap2 and gcm.jar" in android-studio project, when I builds it, causes the following 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.8.0_66\bin\java.exe'' finished with non-zero exit value 1
this is the build.gradle (app):
apply plugin: 'com.android.application'
android {
compileSdkVersion 'Google Inc.:Google APIs:23'
buildToolsVersion '23.0.2'
defaultConfig {
applicationId "com.eywa.paltrack"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/LGPL2.1'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.google.android.gms:play-services:8.3.0'
}
And when I remove (Arcgis SDK) or (com.android.support:design) or (com.google.android.gms:play-services) when I remove one of them the project builds successfully. and I need all of them. can you help me about this problem?
Regarding the described error in your comments:
"java.lang.OutOfMemoryError: GC overhead limit exceeded 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_66\bin\java.exe'' finished with non-zero exit value 3 "
Add this section to the android-section in your build.gradle:
android {
dexOptions {
javaMaxHeapSize "4g"
}
We are facing the problem, after updating to gradle-plugin 1.5.0. This solved our problem.