title: MultiDex support in Android application error
body: <p>I want to use Android L compat libs. after adding the relevant code to gradle, I get the error:</p>
  
  <pre><code>  Error Code:
  2
    Output:
  objc[36290]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
  UNEXPECTED TOP-LEVEL EXCEPTION:
  java.lang.IllegalArgumentException: method ID not in [0, 0xffff]: 65536
    at com.android.dx.merge.DexMerger$6.updateIndex(DexMerger.java:501)
    at com.android.dx.merge.DexMerger$IdMerger.mergeSorted(DexMerger.java:276)
    at com.android.dx.merge.DexMerger.mergeMethodIds(DexMerger.java:490)
    at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:167)
    at com.android.dx.merge.DexMerger.merge(DexMerger.java:188)
    at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:439)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:287)
    at com.android.dx.command.dexer.Main.run(Main.java:230)
    at com.android.dx.command.dexer.Main.main(Main.java:199)
    at com.android.dx.command.Main.main(Main.java:103)
  </code></pre>
  
  <p>I saw questions about it this <a href="https://stackoverflow.com/questions/26515378/issue-updating-to-latest-appcompat-and-support-library">here</a> and <a href="https://stackoverflow.com/questions/15209831/unable-to-execute-dex-method-id-not-in-0-0xffff-65536">here</a>, and tried out the solution from this <a href="https://medium.com/@mustafa01ali/dexs-64k-limit-is-not-a-problem-anymore-well-almost-2b1faac3508" rel="nofollow noreferrer">blog post</a>, and I still get an error, where in the case of the blog post, I get:</p>
  
  <pre><code>  Error Code:
  2  Output:
  objc[36323]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
  UNEXPECTED TOP-LEVEL EXCEPTION:
  com.android.dex.DexException: Library dex files are not supported in multi-dex mode
      at com.android.dx.command.dexer.Main.runMultiDex(Main.java:322)
      at com.android.dx.command.dexer.Main.run(Main.java:228)
      at com.android.dx.command.dexer.Main.main(Main.java:199)
      at com.android.dx.command.Main.main(Main.java:103)
  </code></pre>
  
  <p>These are my android gradle settings:</p>
  
  <pre><code>android {
  compileSdkVersion 21
  buildToolsVersion "20.0.0"
  
  defaultConfig {
      applicationId "com.my.package"
      minSdkVersion 9
      targetSdkVersion 21
  }
  
  buildTypes {
      release {
          runProguard false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>These are my dependencies:</p>
  
  <pre><code>dependencies {
  compile project(':libraries:ecoGallery')
  compile project(':libraries:facebookSDK')
  compile 'com.android.support:support-v4:21.0.0'
  compile 'com.android.support:appcompat-v7:21.0.0'
  compile 'com.google.android.gms:play-services:6.1.71'
  compile 'com.j256.ormlite:ormlite-android:4.48'
  compile 'com.j256.ormlite:ormlite-core:4.48'
  compile 'com.mixpanel.android:mixpanel-android:4.3.1@aar'
  compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.3'
  compile 'com.nineoldandroids:library:2.4.0'
  compile 'oauth.signpost:signpost-commonshttp4:1.2.1.2'
  compile 'oauth.signpost:signpost-core:1.2.1.2'
  compile 'com.uservoice:uservoice-android-sdk:+@aar'
  compile 'com.newrelic.agent.android:android-agent:4.87.0'
  compile 'com.google.guava:guava:18.0'
  compile files('libs/android-support-multidex.jar')
  </code></pre>
  
  <p>}</p>
  
  <p>Does anyone have any ideas for what I might be doing wrong?</p>