Can't build app when I import Xerces library (exit value 1)
<p>I cannot seem to get my app to build when I import in the Xerces library. I am already using the multidex due to previous issues and therefore I know this is all setup properly.</p>

<p>I have spend a couple of days now looking online and trying all sorts of versions of Xerces and tweaks to my build.gradle but cannot work out the issue. I have tried cleaning re-building, re-setting Android Studio/my PC, using a jar directly compiling and now officially out of ideas.</p>

<p>Below is my build.gradle setup:</p>

<pre><code>android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "#packageid#"
        minSdkVersion 18
        targetSdkVersion 23
        versionCode 1
        versionName "0.8"
        multiDexEnabled true
    }

    buildTypes {
        debug {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
//    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.google.android.gms:play-services:8.4.0'
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.android.support:support-v4:23.1.1'
    compile 'com.android.support:design:23.1.1'
    compile 'me.dm7.barcodescanner:zbar:1.8.4'
    compile project(':rangebar-1.3')
    compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
        transitive = true;
    }
    compile 'com.batch.android:batch-sdk:1.5'
    compile 'xerces:xercesImpl:2.11.0'
//    compile files('libs/xercesImpl-2.9.1.jar')
}
</code></pre>

<p>I have also extended my Application already and therefore have used the following within the class:</p>

<pre><code>@Override
protected void attachBaseContext(Context base) {
    super.attachBaseContext(base);

    MultiDex.install(this);
}
</code></pre>

<p>However, every time I try to build I keep getting the following error:</p>

<pre><code>Error:Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.
&gt; com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_79\bin\java.exe'' finished with non-zero exit value 1
</code></pre>

<p>Below is the end part of my gradle build error log:</p>

<pre><code>Reading program jar [C:\Documents\MobileProjects\IA\Android\app\build\intermediates\transforms\jarMerging\debug\jars\1\1f\combined.jar]
Reading library jar [C:\AppData\Local\Android\sdk\build-tools\23.0.2\lib\shrinkedAndroid.jar]
Preparing output jar [C:\Documents\MobileProjects\IA\Android\app\build\intermediates\multi-dex\debug\componentClasses.jar]
  Copying resources from program jar [C:\Documents\MobileProjects\IA\Android\app\build\intermediates\transforms\jarMerging\debug\jars\1\1f\combined.jar]
:app:transformClassesWithMultidexlistForDebug FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.
&gt; com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_79\bin\java.exe'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED
</code></pre>