gradle ERROR: All flavors must now belong to a named flavor dimension.
生活随笔
收集整理的這篇文章主要介紹了
gradle ERROR: All flavors must now belong to a named flavor dimension.
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
在升級(jí)編譯器為android studio?3.4.1后項(xiàng)目報(bào)錯(cuò)如下:?
ERROR: All flavors must now belong to a named flavor dimension. Learn more at https://d.android.com/r/tools/flavorDimensions-missing-error-message.html
Affected Modules: app
先看看官方怎么說(shuō),天下武功唯快不破,網(wǎng)絡(luò)墻頭為華夏老高。助跑下就過(guò)去了。不看英文,咱只看中文,翻譯的準(zhǔn)不準(zhǔn)再說(shuō)~
?
?總結(jié):在
android {}中你的versionName 下加上
flavorDimensions "versionCode"
android {...defaultConfig {...}buildTypes {debug{...}release{...}}
// Specifies one flavor dimension. 整理來(lái)說(shuō)加上這句話flavorDimensions "version"productFlavors {demo {// Assigns this product flavor to the "version" flavor dimension.// This property is optional if you are using only one dimension.dimension "version"applicationIdSuffix ".demo"versionNameSuffix "-demo"}full {dimension "version"applicationIdSuffix ".full"versionNameSuffix "-full"}}
}
如有幫助,感謝領(lǐng)取支付寶紅包
總結(jié)
以上是生活随笔為你收集整理的gradle ERROR: All flavors must now belong to a named flavor dimension.的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: java 排队_JAVA实现排队论
- 下一篇: 冰河入侵与防御