Change your configurations as below
    
    flavorDimensions "market", "version"
    productFlavors {
        amazon {
            flavorDimension "market"
            applicationId "com.app.amazon"
        }
        google {
            flavorDimension "market"
            applicationId "com.app.google"
        }
    }

This has worked for me, Thanks.


On Wednesday, August 26, 2015 at 11:09:41 PM UTC+5:30, Raymond Chiu wrote:
>
>
> Hi Koljanich,
>
> It's flavorDimension without the 's'.  I also suggest using dimension 
> instead as flavorDimension is deprecated.
>
> Raymond
>
> On Tuesday, August 25, 2015 at 1:39:31 PM UTC-7, Koljanich wrote:
>>
>>
>>
>> <http://stackoverflow.com/questions/31985335/errorflavor-amazon-has-no-flavor-dimension#>
>>  
>>
>> I have Android Studio 1.3.1. When I open old project, with Grandle lower 
>> 1.0.0 version, upgrade it, change flavorGroups => flavorDimensions, 
>> packageName => applicationId, runProguard => minifyEnabled. And I have 
>> error: "Error:Flavor 'amazon' has no flavor dimension". When I remark 
>> amazon productFlavor, the error on google. My code is:
>>
>> 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 ->
>>     variant.outputs.each { output ->
>>         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")
>>     }
>> }
>>
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to