解决Error:All flavors must now belong to a named flavor dimension. Learn more at...

低版本的gradle里面不会出现这个错误,高版本出现,不多说,看如何解决

在defaultConfig{}中添加:

flavorDimensions "default"

保证所有的flavor 都属于同一个维度

 defaultConfig {
        applicationId "com.status.channel"
        minSdkVersion 15
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        flavorDimensions "default"
    }

 

你可能感兴趣的:(解决Error:All flavors must now belong to a named flavor dimension. Learn more at...)