title: Android gradle build and the support library
body: <p>I have a project that uses a few other library projects (SlidingMenu, ActionbarSherlock) and both of these use the android support library, when building I am getting the following:</p>
  
  <pre><code>UNEXPECTED TOP-LEVEL EXCEPTION:
  java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/LoaderManager;
      at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:123)
      at com.android.dx.dex.file.DexFile.add(DexFile.java:163)
      at com.android.dx.command.dexer.Main.processClass(Main.java:490)
      at com.android.dx.command.dexer.Main.processFileBytes(Main.java:459)
      at com.android.dx.command.dexer.Main.access$400(Main.java:67)
      at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:398)
      at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:245)
      at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:131)
      at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:109)
      at com.android.dx.command.dexer.Main.processOne(Main.java:422)
      at com.android.dx.command.dexer.Main.processAllFiles(Main.java:333)
      at com.android.dx.command.dexer.Main.run(Main.java:209)
      at com.android.dx.command.dexer.Main.main(Main.java:174)
      at com.android.dx.command.Main.main(Main.java:91)
  </code></pre>
  
  <p>Both library projects have a dependency on support lib:</p>
  
  <pre><code>dependencies {
      compile files('libs/android-support-v4.jar')
  }
  </code></pre>