title: Error updating buildToolsVersion 21.0.2 to 22.0.1
body: <p>Recently addded this:</p>
  
  <p><strong>buildToolsVersion '22.0.1'</strong></p>
  
  <p>I am using different productFlavors.</p>
  
  <pre><code>android {
  
      compileSdkVersion 22
      buildToolsVersion '22.0.1'
  
      defaultConfig {
          applicationId 'com.consulta'
          minSdkVersion 17
          targetSdkVersion 22
          versionCode 14
          versionName '1.0.11'
      }
  
      signingConfigs {
          release {
              storeFile file("keystore.jks")
              storePassword "******"
              keyAlias "MyAlias"
              keyPassword "******"
          }
      }
  
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
              signingConfig signingConfigs.release
          }
      }
      productFlavors {
          production {
              applicationId "com.app"
              resValue "string", "app_name", "MyApp"
              minSdkVersion 17
              targetSdkVersion 22
          }
          stage {
              applicationId "com.app.stage"
              resValue "string", "app_name", "MyApp.Stage"
              minSdkVersion 17
              targetSdkVersion 22
          }
          freeze {
              applicationId "com.app.freeze"
              resValue "string", "app_name", "MyApp.Freeze"
              minSdkVersion 17
              targetSdkVersion 22
          }
      }
  
      sourceSets {
          main {
              assets.srcDirs = ['src/main/assets', 'src/main/assets/']
          }
      }
  
  
  }
  
  dependencies {
   compile fileTree(dir: 'libs', include: ['*.jar'])
  'com.android.support:appcompat-v7:22.0.0' 
  }
  </code></pre>
  
  <p>Here are the errors:</p>
  
  <blockquote>
    <p>Error:Execution failed for task ':app:dexStageRelease' UNEXPECTED
    TOP-LEVEL EXCEPTION:</p>
    
    <p>com.android.dex.DexIndexOverflowException: method ID not in [0,
    0xffff]: 65536        at
    com.android.dx.merge.DexMerger$6.updateIndex(DexMerger.java:502)<br>
          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)<br>
          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)<br>
          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)</p>
  </blockquote>