Gradle Build error with exception
I'm new to the studio,
I am trying to run my application
Error detected -
Something went wrong:
Execution failed for task ': app: dexDebug'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command' / Library / Java / JavaVirtualMachines / jdk1.7.0_79.jdk / Contents / Home / bin / java '' completed with non-zero output value 1
I tried with jdk 1.8 which gave the same error.
So several answers were found that talked about reducing jdk to 1.7
but the error still persists
Please imagine what to do
Gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "innovapptive.com.mworkorder"
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:22.0.0'
}
source to share
I fllow the first answer and then another problem caused: ** Error: Execution completed for task ': app: packageAllDebugClassesForMultiDex'.
java.util.zip.ZipException: Re-entry: com / umeng / analytics / AnalyticsConfig.class ** Then it happened: Error: Executed for task ": app: packageAllDebugClassesForMultiDex". java.util.zip.ZipException: Re-entry: com / umeng / analytics / AnalyticsConfig.class So I tried to remove this:
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 project(':libraries:SlidingMenu')
compile files('libs/volley_src.jar')
compile files('libs/Volley_bin.jar')
// compile 'com.umeng.analytics:analytics:latest.integration'
// compile files('libs/umeng-analytics-v5.6.1.jar')
compile files('libs/xUtils-2.6.14.jar')
}
This works and I don't know why, I can try the latest Umeng SDK later. It might work for you if you are using the counting and analysis SDK.
source to share