title: Android Gradle compiling commons-io creates duplicate in library tree
body: <p>I'm trying to build and maintain an old application for work but I can't get past the build phase.  In my <code>app/build.gradle</code> file I have </p>
  
  <pre><code>dependencies { 
      compile fileTree(dir: 'libs', include: ['*.jar'])
      compile 'com.apache.commons:commons-io:1.3.2'
      //some more libraries compiled as well
  }
  </code></pre>
  
  <p>but get the following error when trying to execute:</p>
  
  <blockquote>
    <p>Error:Execution failed for task ':myApp'.
    com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: org/apache/commons/io/CopyUtils.class</p>
  </blockquote>
  
  <p>This is almost certainly because when I compile that jar, at the top of my External Libraries tree, this is generated:</p>
  
  <p><a href="https://i.stack.imgur.com/1Q2SI.png" rel="noreferrer"><img src="https://i.stack.imgur.com/1Q2SI.png" alt="enter image description here"></a></p>
  
  <p>Why is this happening, and how can I get it to stop so I can complete the build?</p>