环境

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.的更多相关文章

  1. 解决Error:All flavors must now belong to a named flavor dimension. Learn more at...

    低版本的gradle里面不会出现这个错误,高版本出现,不多说,看如何解决 在defaultConfig{}中添加:flavorDimensions "default" 保证所有的f ...

  2. 解决Error:All flavors must now belong to a named flavor dimension. Learn more at https://d.android.com

    主app的build.gradle里面的 defaultConfig { targetSdkVersion:*** minSdkVersion :*** versionCode:*** version ...

  3. All flavors must now belong to a named flavor dimension

    FAQ: All flavors must now belong to a named flavor dimension. Learn more at https://d.android.com/r/ ...

  4. 安卓 android studio 报错 All flavors must now belong to a named flavor dimension. Learn more at https://d.android.com

    这个问题是Android studio升级到3.0之后,运行的时候会提示gradle要升级到3.5版本才能编译.于是我把我的gradle升级到了 gradle-4.1-milestone-1 版本,是 ...

  5. 更新Android Studio 3.0碰到的问题

    更新完后试下运行正在维护的旧项目,出现各种错误,因为后来发现问题不在这,所以没记完整,大概如下: A larger heap for the Gradle daemon is recommended ...

  6. Android之友盟多渠道打包与数据统计

    文章大纲 一.多渠道打包与数据统计介绍二.友盟实现多渠道打包实战三.友盟数据统计实战四.项目源码下载五.参考文章   一.多渠道打包与数据统计介绍   多渠道打包,相信很多同学都知道.在Android ...

  7. Android Studio 常见问题及解决方法

    一.Error:All flavors must now belong to a named flavor dimension 问题描述: Error:All flavors must now bel ...

  8. 升级到 Android Studio 3.0 + Gradle 4.1 遇到的一些坑及解决方案

    问题一: Cannot set the value of read-only property 'outputFile' for ApkVariantOutputImpl_Decorated{apkD ...

  9. gradle tool升级到3.0注意事项

    Gradle版本升级 其实当AS升级到3.0之后,Gradle Plugin和Gradle不升级也是可以继续使用的,但很多新的特性如:Java8支持.新的依赖匹配机制.AAPT2等新功能都无法正常使用 ...

随机推荐

  1. OCP 052新加的考试题收集整理-第20道

    20. Which is true about the SYSTEM and SYSAUX tablespaces? A) The SYSAUX tablespace can be made read ...

  2. XPath语法使用的一些心得

    XPath语法还是很强大的,支持一些函数和操作符,方便操作,但是因为版本的原因可能有的函数只能在XPath2(2007)里使用,而不能在XPath1(1999)中使用,比如函数 ends-with(s ...

  3. php-elasticsearch bulk批量插入数据

    1.单条插入 <?php include '../vendor/Elasticsearch/autoload.php'; $a['hosts'] = array( #需要用户名时 http:// ...

  4. [原创]Heroku简单部署指南

    目录 1. 设置 1.1 环境依赖 1.2 Heroku 客户端安装 1.3 登录 2. 应用 2.1 创建 2.2 查看日志 2.3 附加组件 2.4 交互式 Shell 2.5 定义 配置变量 2 ...

  5. TP5.0学习历程(1)

    验证码的使用 控制器代码如下: $captcha = new \think\captcha\Captcha();         if (!$captcha->check($data['code ...

  6. 洛谷 P3201 [HNOI2009]梦幻布丁(启发式合并)

    题面 luogu 题解 什么是启发式合并? 小的合并到大的上面 复杂度\(O(nlogn)\) 这题颜色的修改,即是两个序列的合并 考虑记录每个序列的\(size\) 小的合并到大的 存序列用链表 但 ...

  7. Go语言包和文件

    工作空间 Go语言工作空间:编译工具对源码目录有严格要求,每个工作空间 (workspace) 必须由bin.pkg.src三个目录组成. src ---- 项目源码目录,里面每一个子目录,就是一个包 ...

  8. Java Web基础——Controller+Service +Dao三层的功能划分

    转自:https://www.cnblogs.com/cielosun/articles/5752272.html 1. Controller/Service/DAO简介: Controller是管理 ...

  9. 4:Median of Two Sorted Arrays

    here are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two ...

  10. es第二篇:Document APIs

    文档CRUD API分为单文档API和多文档API.这些API的索引名参数既可以是一个真正的索引的名称,也可以是某个索引的别名alias. 单文档API有:Index API.Get API.Dele ...