title: Gradle Build fail when i import an external library
body: <p>I added a new library to my android studio project and now I am getting this error when I run it:</p>
  
  <pre><code>UNEXPECTED TOP-LEVEL ERROR: 
  Execution failed for task ':app:preDexDebug'.
  &gt;com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command' /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bin/java" finished with non-zero value 3
  BUILD FAILED
  Total time:17 mins 33.841 secs
  1 error
  0 warning
  </code></pre>
  
  <p>I added the library in app/libs. I used right click and add as a library.
  <a href="http://i.stack.imgur.com/PlVO2.png" rel="nofollow">add as library</a></p>
  
  <p>I read that is possible fix this error if i put the library in External Libraries instead of Project/app/libs but i dont know how to do it.
    <a href="http://i.stack.imgur.com/vv68C.png" rel="nofollow">External libraries</a></p>
  
  <p>This is my build gradle file: </p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 23
      buildToolsVersion "23.0.2"
  
      defaultConfig {
          applicationId "com.example.nameht.pruebas"
          minSdkVersion 15
          targetSdkVersion 23
          versionCode 1
          versionName "1.0"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'),      'proguard-rules.pro'
          }
      }
  }
  dependencies {
      compile fileTree(include: ['*.jar'], dir: 'libs')
      testCompile 'junit:junit:4.12'
      compile 'com.android.support:appcompat-v7:23.2.0'
      compile files('libs/symja-2016-03-07.jar')
  }
  </code></pre>