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
I might need more information but according to the error on your question:
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
The IntelliJ compilation way might cause the error you post (at least in my case, it does). I recently came from Eclipse, where a 'Clean Project' is made after every run. In IntelliJ, the project needs a clean build to be run. I've avoided cleaning every time, disabling incremental flag inside dexOptions of the build.gradle.