Android Studio 3.0 Flavor Dimension Issue

后端 未结 7 1604
我寻月下人不归
我寻月下人不归 2020-12-04 05:49

Upgraded to Studio Canary build. My previous project of Telegram Messenger is giving following error.

Error:All flavors must now belong to a named fla

相关标签:
7条回答
  • 2020-12-04 06:55

    I have used flavorDimensions for my application in build.gradle (Module: app)

    flavorDimensions "tier"
    
    productFlavors {
        production {
            flavorDimensions "tier"
            //manifestPlaceholders = [appName: APP_NAME]
            //signingConfig signingConfigs.config
        }
        staging {
            flavorDimensions "tier"
            //manifestPlaceholders = [appName: APP_NAME_STAGING]
            //applicationIdSuffix ".staging"
            //versionNameSuffix "-staging"
            //signingConfig signingConfigs.config
        }
    }
    

    Check this link for more info

    // Specifies two flavor dimensions.
    flavorDimensions "tier", "minApi"
    
    productFlavors {
         free {
                // Assigns this product flavor to the "tier" flavor dimension. Specifying
                // this property is optional if you are using only one dimension.
                dimension "tier"
                ...
         }
    
         paid {
                dimension "tier"
                ...
         }
    
         minApi23 {
                dimension "minApi"
                ...
         }
    
         minApi18 {
                dimension "minApi"
                ...
         }
    }
    
    0 讨论(0)
提交回复
热议问题