解决gradle编译报Error:All flavors must now belong to a named flavor dimension.问题
生活随笔
收集整理的這篇文章主要介紹了
解决gradle编译报Error:All flavors must now belong to a named flavor dimension.问题
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
解決方案 為productFlavors 配置 flavorDimensions “version”
android {...defaultConfig {...}buildTypes {debug{...}release{...}}// Specifies one flavor dimension.flavorDimensions "version"productFlavors {demo {// Assigns this product flavor to the "version" flavor dimension.// If you are using only one dimension, this property is optional,// and the plugin automatically assigns all the module's flavors to// that dimension.dimension "version"applicationIdSuffix ".demo"versionNameSuffix "-demo"}full {dimension "version"applicationIdSuffix ".full"versionNameSuffix "-full"}}}學習更多請參考官方文檔 配置構建變體
總結
以上是生活随笔為你收集整理的解决gradle编译报Error:All flavors must now belong to a named flavor dimension.问题的全部內容,希望文章能夠幫你解決所遇到的問題。