gradle ERROR: All flavors must now belong to a named flavor dimension.
生活随笔
收集整理的這篇文章主要介紹了
gradle ERROR: All flavors must now belong to a named flavor dimension.
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
在升級編譯器為android studio?3.4.1后項目報錯如下:?
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
先看看官方怎么說,天下武功唯快不破,網絡墻頭為華夏老高。助跑下就過去了。不看英文,咱只看中文,翻譯的準不準再說~
?
?總結:在
android {}中你的versionName 下加上
flavorDimensions "versionCode"
android {...defaultConfig {...}buildTypes {debug{...}release{...}}
// Specifies one flavor dimension. 整理來說加上這句話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"}}
}
如有幫助,感謝領取支付寶紅包
總結
以上是生活随笔為你收集整理的gradle ERROR: All flavors must now belong to a named flavor dimension.的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: java 排队_JAVA实现排队论
- 下一篇: 冰河入侵与防御