title: Gradle Error - Duplicate Files copied in APK AndroidManifest.xml
body: <p>I am trying to import a library (Evernote Android-SDK) into Android Studio.  I got gradle to find and download it (It showed up in the External Libraries portion or the Project Explorer).  Then it started to tell me it was creating a duplicate file.</p>
  
  <pre><code>buildscript {
      repositories {
          mavenCentral()
     }
     dependencies {
          classpath 'com.android.tools.build:gradle:0.5.+'
     }
  }
  apply plugin: 'android'
  
  repositories {
      mavenCentral()
  }
  
  dependencies {
      compile 'com.android.support:support-v4:13.0.+'
      compile 'com.evernote:android-sdk:1.1.+'
  }
  
  android {
      compileSdkVersion 17
      buildToolsVersion "17.0.0"
  
      defaultConfig {
          minSdkVersion 14
          targetSdkVersion 16
      }
  }
  </code></pre>
  
  <p>This is the set of errors that show up.</p>
  
  <pre><code>Gradle: : duplicate files during packaging of APK C:\Users\SSMI\My Projects\AutoNote\AndroidProject\AutoNote\build\apk\AutoNote-debug-unaligned.apk
  Gradle: Execution failed for task ':AutoNote:packageDebug'.
      &gt; Duplicate files copied in APK AndroidManifest.xml
      File 1: C:\Users\SSMI\My Projects\AutoNote\AndroidProject\AutoNote\build\libs\AutoNote-debug.ap_
      File 2: C:\Users\SSMI\My Projects\AutoNote\AndroidProject\AutoNote\build\libs\AutoNote-debug.ap_
  </code></pre>
  
  <p>What is the problem here and how can I fix it?</p>
  
  <p><strong>Answer</strong><br>
  So what I did is put a folder in the project root called libraries.  I moved the evernote sdk library folder into that and named it evernote.</p>
  
  <p>Then I went to file project structure.  I ignored the warning.  I went into modules clicked the + and added the evernote folder.  I then selected my app project module and went to the dependencies tab.  I hit + there (you may have to Alt+Insert if it won't click) and added the module I imported (evernote).</p>
  
  <p>I was then tricked into thinking it didn't work because I forgot to import it in the source files.</p>