title: Gradle dependency issues android
body: <p>I've noticed there is a conflict between io.reactive and estimote's sdk but I can't seem to figure out how to resolve it. I honestly only noticed the conflict by removing the estimote dependency and then later removing the two reactivex dependencies and finding the project functional. I have tried excluding common libraries but nothing seems to work. Here is everything I have:</p>
  
  <p>Original Error:</p>
  
  <pre><code>UNEXPECTED TOP-LEVEL EXCEPTION:
  com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536
      at com.android.dx.merge.DexMerger$6.updateIndex(DexMerger.java:502)
      at com.android.dx.merge.DexMerger$IdMerger.mergeSorted(DexMerger.java:277)
      at com.android.dx.merge.DexMerger.mergeMethodIds(DexMerger.java:491)
      at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:168)
      at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
      at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:454)
      at com.android.dx.command.dexer.Main.runMonoDex(Main.java:303)
      at com.android.dx.command.dexer.Main.run(Main.java:246)
      at com.android.dx.command.dexer.Main.main(Main.java:215)
      at com.android.dx.command.Main.main(Main.java:106)
  Error:Execution failed for task ':app:dexDebug'.
  &gt; com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2
  </code></pre>
  
  <p>Gradle:</p>
  
  <pre><code>apply plugin: 'com.android.application'
  apply plugin: 'io.fabric'
  
  
  buildscript {
      repositories {
  
  //
          maven { url 'https://maven.fabric.io/public' }
      }
  
      dependencies {
  
  
  
          classpath 'io.fabric.tools:gradle:1.+'
      }
  }
  
  
  
  repositories {
      mavenCentral()
  //
      maven { url 'https://maven.fabric.io/public' }
  }
  
  android {
  
      compileSdkVersion 22
      buildToolsVersion "22.0.1"
  
      defaultConfig {
          applicationId "com.whats.up"
          minSdkVersion 18
          targetSdkVersion 18
          versionCode 49
          versionName "2.0"
      }
  
  
  
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
              signingConfig signingConfigs.release
          }
      }
  
      lintOptions {
          abortOnError false
      }
  }
  
  dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
      compile 'com.android.support:appcompat-v7:21.0.+'
      compile 'com.android.support:support-v4:20.0.+'
      compile 'uk.co.chrisjenx:calligraphy:2.0.1'
      compile 'com.squareup.retrofit:retrofit:1.9.0'
      compile 'com.squareup.picasso:picasso:2.5.2'
      compile 'com.mixpanel.android:mixpanel-android:4.5.3'
      compile 'com.google.android.gms:play-services:6.+'
      compile 'com.github.ksoichiro:android-observablescrollview:1.5.2'
      compile 'com.nineoldandroids:library:2.4.0'
      compile 'com.github.castorflex.smoothprogressbar:library:1.1.0'
      compile project(":libs:library")
      compile 'io.realm:realm-android:0.81.1'
      compile files('libs/cwac-merge-1.1.1-2.jar')
      compile files('libs/cwac-camera-0.6.12.jar')
      compile 'com.makeramen:roundedimageview:2.1.0'
      compile 'com.facebook.android:facebook-android-sdk:4.0.0'
      compile 'com.android.support:cardview-v7:22.1.1'
      compile('com.twitter.sdk.android:twitter:1.0.0@aar') {
          transitive = true;
      }
      compile 'io.reactivex:rxandroid:1.0.1'
      compile 'io.reactivex:rxjava:1.0.0'
      compile ('com.estimote:sdk:0.8.6@aar'){
  //
          exclude module: 'appcompat-v7'
          exclude module: 'support-v4'
          exclude module: 'support-annotations'
          exclude module: 'junit'
          exclude module: 'io.reactivex'
          exclude group: 'com.google.android'
          exclude group: 'com.google.android.*'
          exclude group: 'com.google.code.findbugs'
          exclude group: 'com.android.dx'
      }
      compile('com.twitter.sdk.android:tweet-composer:0.7.0@aar')
              {
                  transitive = true;
              }
      compile('com.crashlytics.sdk.android:crashlytics:2.5.1@aar') {
          transitive = true;
  
      }
  }
  </code></pre>
  
  <p>./gradlew -q app:dependencies:</p>
  
  <pre><code>compile - Classpath for compiling the main sources.
  +--- com.android.support:appcompat-v7:21.0.+ -&gt; 21.0.3
  |    \--- com.android.support:support-v4:21.0.3 -&gt; 22.0.0
  |         \--- com.android.support:support-annotations:22.0.0
  +--- com.android.support:support-v4:20.0.+ -&gt; 22.0.0 (*)
  +--- uk.co.chrisjenx:calligraphy:2.0.1
  +--- com.squareup.retrofit:retrofit:1.9.0
  |    \--- com.google.code.gson:gson:2.3.1
  +--- com.squareup.picasso:picasso:2.5.2
  +--- com.mixpanel.android:mixpanel-android:4.5.3
  +--- com.google.android.gms:play-services:6.+ -&gt; 6.5.87
  |    \--- com.android.support:support-v4:21.0.0 -&gt; 22.0.0 (*)
  +--- com.github.ksoichiro:android-observablescrollview:1.5.2
  |    \--- com.android.support:recyclerview-v7:21.0.0
  |         \--- com.android.support:support-v4:21.0.0 -&gt; 22.0.0 (*)
  +--- com.nineoldandroids:library:2.4.0
  +--- com.github.castorflex.smoothprogressbar:library:1.1.0
  +--- project :libs:library
  |    \--- com.android.support:support-v4:22.0.0 (*)
  +--- io.realm:realm-android:0.81.1
  +--- com.makeramen:roundedimageview:2.1.0
  +--- com.facebook.android:facebook-android-sdk:4.0.0
  |    +--- com.android.support:support-v4:[21,22) -&gt; 22.0.0 (*)
  |    \--- com.parse.bolts:bolts-android:1.1.4
  +--- com.android.support:cardview-v7:22.1.1
  +--- com.twitter.sdk.android:twitter:1.0.0
  |    +--- com.twitter.sdk.android:tweet-composer:0.7.0
  |    |    +--- com.twitter.sdk.android:twitter-core:1.0.0
  |    |    |    +--- com.squareup.retrofit:retrofit:1.6.1 -&gt; 1.9.0 (*)
  |    |    |    +--- io.fabric.sdk.android:fabric:1.0.0 -&gt; 1.3.5
  |    |    |    \--- com.google.code.gson:gson:2.2.4 -&gt; 2.3.1
  |    |    \--- io.fabric.sdk.android:fabric:1.0.0 -&gt; 1.3.5
  |    +--- com.digits.sdk.android:digits:1.0.0
  |    |    +--- com.twitter.sdk.android:twitter-core:1.0.0 (*)
  |    |    +--- io.fabric.sdk.android:fabric:1.0.0 -&gt; 1.3.5
  |    |    \--- com.twitter.sdk.android:tweet-ui:1.0.0
  |    |         +--- com.twitter.sdk.android:twitter-core:1.0.0 (*)
  |    |         +--- com.squareup.picasso:picasso:2.3.2 -&gt; 2.5.2
  |    |         +--- io.fabric.sdk.android:fabric:1.0.0 -&gt; 1.3.5
  |    |         \--- com.android.support:support-v4:21.0.0 -&gt; 22.0.0 (*)
  |    +--- com.twitter.sdk.android:twitter-core:1.0.0 (*)
  |    +--- io.fabric.sdk.android:fabric:1.0.0 -&gt; 1.3.5
  |    \--- com.twitter.sdk.android:tweet-ui:1.0.0 (*)
  +--- io.reactivex:rxandroid:1.0.1
  |    \--- io.reactivex:rxjava:1.0.13
  +--- io.reactivex:rxjava:1.0.0 -&gt; 1.0.13
  +--- com.estimote:sdk:0.8.6
  +--- com.twitter.sdk.android:tweet-composer:0.7.0 (*)
  \--- com.crashlytics.sdk.android:crashlytics:2.5.1
       +--- io.fabric.sdk.android:fabric:1.3.5
       +--- com.crashlytics.sdk.android:crashlytics-core:2.3.4
       |    +--- io.fabric.sdk.android:fabric:1.3.5
       |    \--- com.crashlytics.sdk.android:answers:1.3.1
       |         \--- io.fabric.sdk.android:fabric:1.3.5
       +--- com.crashlytics.sdk.android:beta:1.1.3
       |    \--- io.fabric.sdk.android:fabric:1.3.4 -&gt; 1.3.5
       \--- com.crashlytics.sdk.android:answers:1.3.1 (*)
  </code></pre>
  
  <p>I am fairly unsure on how to interpret the last part there - so if my issue is revealed in that I'd love to know how to find it for future reference! Thanks!</p>