title: Appcompat-v7 conflict in android
body: <p>I ran into a nasty problem. In my project I have a library (.aar) file which is including an appcompat-v7 compatibility library. Now in my project I also have another appcompat-v7 under the dependency section of gradle.build (app) file.. </p>
  
  <p>The problem is when I run the Application it throws an exception saying</p>
  
  <pre><code>UNEXPECTED TOP-LEVEL EXCEPTION:com.android.dex.DexException: Multiple dex files define Landroid/support/v7/appcompat/R$anim;
  </code></pre>
  
  <p>Here is my application gradle.build (app) file relevant part (I think so)</p>
  
  <pre><code>repositories {
        flatDir {
          dirs 'libs'
        }
  }
  
  dependencies {
      testCompile 'junit:junit:4.12'
      compile 'com.android.support:appcompat-v7:22.2.1'
      compile(name: 'conversityChat-debug', ext: 'aar') {
          exclude group: 'com.android.support', module: 'support-v7'
      }
  }
  </code></pre>
  
  <p>And here is my library gradle.build(app) file relevant part (I think so)</p>
  
  <pre><code>dependencies {
  compile project(':androidwebsocketsmaster')
  compile 'com.android.support:appcompat-v7:22.2.1'
  compile files('libs/acra-4.5.0.jar')
  compile files('libs/universal-image-loader-1.9.4.jar')
  }
  </code></pre>
  
  <p>I'm using android studio.. I know this question has been asked before, and I've tried out all possible solutions suggested over there. Sadly, None of them helped... Please help me out</p>