title: Error:Flavor 'amazon' has no flavor dimension
body: <p>I have <strong>Android Studio 1.3.1</strong>. When I open old project, with <strong>Grandle lower 1.0.0 version</strong>, upgrade it, change <code>flavorGroups =&gt; flavorDimensions, packageName =&gt; applicationId, runProguard =&gt; minifyEnabled</code>. And I have error:</p>
  
  <pre><code>"Error:Flavor 'amazon' has no flavor dimension". 
  </code></pre>
  
  <p>When I remark amazon productFlavor, the error on google. My code is:</p>
  
  <pre><code>    android {
      compileSdkVersion 19
      buildToolsVersion "20.0.0"
  
      defaultConfig {
          minSdkVersion 9
          targetSdkVersion 19
          versionName = "1.3.3"
          versionCode = 33
      }
  
      flavorDimensions "market", "version"
  
      project.archivesBaseName = "pp"
  
      signingConfigs {
          production {
              storeFile file("XXX")
              storePassword "XXXXXX"
              keyAlias "My App"
              keyPassword "XXXXX"
          }
      }
  
      buildTypes {
          debug {
              minifyEnabled false
          }
  
          release {
              minifyEnabled false
              proguardFile 'proguard-project.txt'
              debuggable false
              signingConfig signingConfigs.production
          }
      }
  
      productFlavors {
          amazon {
              flavorDimensions "market"
          }
          google {
              flavorDimensions "market"
          }
  
      }
  
      lintOptions {
          abortOnError false
      }
      applicationVariants.all { variant -&gt;
          variant.outputs.each { output -&gt;
              def apk = output.outputFile;
              def newName = "${output.name}-${variant.mergedFlavor.versionCode}"
              if (variant.buildType.versionNameSuffix) {
                  newName += "-${variant.buildType.versionNameSuffix}"
              }
              if (output.zipAlign) {
                  output.zipAlign.outputFile = new File((File) apk.parentFile, newName + '-aligned.apk');
              }
              output.packageApplication.outputFile = new File((File) apk.parentFile, newName + ".apk")
          }
      }
  }
  </code></pre>