I am new in android programming and I use android studio IDE. I am trying to run a program but I face with 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.8.0_45\bin\java.exe'' finished with non-zero exit value 2`
I have searched a lot on the internet. There was a solution which said: Try to remove your jar files one by one and then in each time build your project. So you can the jar file which caused the problem. But this couldn't help me.
In another solution, I found that this i=may be because of duplication of names. I have checked all files and I didn't found any duplication.
I found another solution but I couldn't understand it.
So, I'm getting confused what I should do. It is really annoying.
Can anyone please help me to understand the problem.? Thanks in advance
- Sorry for my poor english
By the way, this is build.gradle
apply plugin: 'com.android.application' android { compileSdkVersion 22 buildToolsVersion "22.0.1" defaultConfig { applicationId "b.ir" minSdkVersion 14 targetSdkVersion 22 versionCode 1 versionName "1.0" } 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:22.1.1' compile files('libs/glide-3.3.1.jar') compile files('libs/okhttp-2.4.0.jar') compile files('libs/analytics-1.2.0.jar') compile files('libs/google-play-services.jar') compile 'com.google.android.gms:play-services:4.1.32' compile files('libs/mimecraft-1.1.1.jar') compile files('libs/library-1.2.2.jar') compile files('libs/com.google.android.maps.jar') compile 'com.google.android.exoplayer:exoplayer:r1.2.3' compile files('libs/realm-0.82.0.jar') }