I imported a project from Eclipse to Android. Then I get this error message after I tried to run application:
Error:Execution failed for task ':app:dexDebug'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files (x86)\Java\jdk1.8.0_40\bin\java.exe'' finished with non-zero exit value 2
It seems like this problem: Error:Execution failed for task ':app:dexDebug'. com.android.ide.common.process.ProcessException
But I tried all of the answers and none of them worked.
Here is my build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "22.0.1"
compileOptions.encoding = 'windows-1251'
defaultConfig {
applicationId "sk.app"
minSdkVersion 15
targetSdkVersion 21
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 'com.android.support:support-v4:23.1.1'
compile 'com.google.code.gson:gson:2.3'
compile files('libs/activation.jar')
compile files('libs/droidText.0.4.jar')
compile files('libs/google-play-services.jar')
compile files('libs/mail.jar')
}