title: How to solve a Duplicate file exception in android?
body: <p>I am  trying to make a chat application using <code>Firebase</code>. The code seems to be fine but I am getting a strange error while trying to run the project. </p>
  
  <p>Here is the error:</p>
  
  <pre><code>Error:FAILURE: Build failed with an exception.
  Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
  &gt; com.android.build.api.transform.TransformException:com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/LICENSE
  File1: C:\Users\Aadesh\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-annotations\2.2.2\285cb9c666f0f0f3dd8a1be04e1f457eb7b15113\jackson-annotations-2.2.2.jar
  File2: C:\Users\Aadesh\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-databind\2.2.2\3c8f6018eaa72d43b261181e801e6f8676c16ef6\jackson-databind-2.2.2.jar
  File3: C:\Users\Aadesh\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-core\2.2.2\d20be6a5ddd6f8cfd36ebf6dea329873a1c41f1b\jackson-core-2.2.2.jar
  
  
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.
  </code></pre>
  
  <p>What could be the problem and how do i solve this?</p>
  
  <p>Gradle file:</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
  compileSdkVersion 24
  buildToolsVersion "25.0.0"
  defaultConfig {
      applicationId "com.example.aadesh.chatnow"
      minSdkVersion 17
      targetSdkVersion 24
      versionCode 1
      versionName "1.0"
      testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  }
  buildTypes {
      release {
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
      }
  }
  }
  
  dependencies {
  compile fileTree(include: ['*.jar'], dir: 'libs')
  androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
      exclude group: 'com.android.support', module: 'support-annotations'
  })
  compile 'com.android.support:appcompat-v7:24.2.1'
  compile 'com.android.volley:volley:1.0.0'
  testCompile 'junit:junit:4.12'
  compile 'com.firebase:firebase-client-android:2.5.2'
  }
  apply plugin: 'com.google.gms.google-services'
  </code></pre>