Search code examples
javaandroiddocx4j

Execution failed for task ':app:dexDebug'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException


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


Solution

  • I had got the same error. But I resolved the issue by adding the following missing line from build.gradle in dependencies. compile 'com.parse.bolts:bolts-android:1.+'

    After adding this line, my dependencies body was like this:
    dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.0.0'
    compile 'com.parse.bolts:bolts-android:1.+'
    compile fileTree(dir: 'libs', include: 'Parse-*.jar')
    compile fileTree(dir: 'libs', include: "commons-io-2.4.jar")  }
    

    You can match with yours too and see if it can help you too