I am building my android project when i got this error after import docx4j library in my project. What should i do to get rid of this exception.
Error:Execution failed for task ':app:dexDebug'. > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-7-openjdk-amd64/bin/java'' finished with non-zero exit value 2
Add this to your file build. gradle
defaultConfig {
multiDexEnabled true
}
The Android plugin for Gradle available in Android SDK Build Tools 21.1 and higher supports multidex, so you have to add multiDexEnabled true
to your gradle file like below :
android {
compileSdkVersion 21
buildToolsVersion "21.1.0"
defaultConfig {
...
minSdkVersion 14
targetSdkVersion 21
...
// Enabling multidex support.
multiDexEnabled true
}
...
}
dependencies {
compile 'com.android.support:multidex:1.0.0'
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With