码迷,mamicode.com
首页 > 其他好文 > 详细

Error:All flavors must now belong to a named flavor dimension.

时间:2018-06-24 19:39:06      阅读:483      评论:0      收藏:0      [点我收藏+]

标签:targe   android   build   def   gradle   and   erro   named   dimens   

环境

android studio 3.0

错误

Error:All flavors must now belong to a named flavor dimension.

解决

在build.gradle中
android.defaultConfig 添加flavorDimensions "versionCode"

例如·:

android {
    compileSdkVersion rootProject.ext.compileSdkVersion
    buildToolsVersion rootProject.ext.buildToolsVersion

    defaultConfig {
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode rootProject.ext.versionCode
        versionName rootProject.ext.versionName

        flavorDimensions "versionCode"
    }
...

Error:All flavors must now belong to a named flavor dimension.

标签:targe   android   build   def   gradle   and   erro   named   dimens   

原文地址:https://www.cnblogs.com/lifan1998/p/9221089.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!