Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'flavorDimension' will be removed by Android Gradle Plugin 2.0, it has been replaced by 'dimension'

Tags:

android

gradle

As of com.android.tools.build:gradle:1.3.0 you'll get 'flavorDimension' will be removed by Android Gradle Plugin 2.0, it has been replaced by 'dimension'.

This is my build file:

build.gradle

android {
    flavorDimensions "store", "api"

    productFlavors {
        googleplay {
            flavorDimension "store"
        }

        amazon {
            flavorDimension "store"
        }

        pre21 {
            flavorDimension "api"
        }

        post21 {
            flavorDimension "api"
        }
    }
}
like image 216
Niklas Avatar asked Aug 11 '15 08:08

Niklas


1 Answers

In order to fix it one has to rename flavorDimension simply to dimension.

android {
    flavorDimensions "store", "api"

    productFlavors {
        googleplay {
            dimension "store"
        }

        amazon {
            dimension "store"
        }

        pre21 {
            dimension "api"
        }

        post21 {
            dimension "api"
        }
    }
}
like image 156
Niklas Avatar answered Nov 09 '22 04:11

Niklas