Error:All flavors must now belong to a named flavor dimension. Learn more at https://d.android.com

出现原因:

  • Android Studio 升级到3.0之后,配置多版本打包。

解决方法:

  • 在defaultConfig{}中添加:flavorDimensions "default" 即可,也可不写default不过建议写。

代码参照如下

defaultConfig{
  favorDimensions "default"
}

你可能感兴趣的:(Error:All flavors must now belong to a named flavor dimension. Learn more at https://d.android.com)