解决com.android.support版本冲突问题
原文:https://www.jianshu.com/p/0fe985a7e17e
项目中不同Module的support包版本冲突怎么办?
只需要将以下代码复制到每个模块的build.gradle(Module:xxx)文件的根目录即可:
// 统一当前Module的所有support包版本
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '28.0.0'
}
}
}
}
模板代码如下:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
...
}
buildTypes {
...
}
lintOptions {
...
}
}
dependencies {
...
}
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '28.0.0'
}
}
}
}
解决com.android.support版本冲突问题的更多相关文章
- spring maven项目解决依赖jar包版本冲突方案
引入:http://blog.csdn.net/sanzhongguren/article/details/71191290 在spring reference中提到一个解决spring jar包之间 ...
- Android Studio中依赖第三库导致support版本冲突解决方案
1.今天在Android Studio的app/gradle文件中依赖文件选择器的第三方库:“com.leon:lfilepickerlibrary:1.8.0” 时,github地址:https:/ ...
- 在Visual Studio 中使用 <AutoGenerateBindingRedirects> 来解决引用的程序集版本冲突问题
问题: https://stackoverflow.com/questions/42836248/using-autogeneratebindingredirects-in-visual-studio ...
- 解决shiro和quartz2 版本冲突问题
修改build.gradle compile ("org.quartz-scheduler:quartz:2.2.3") compile ("org.apache.s ...
- 11:如何解决Maven的Jar版本冲突问题
右键 Exclude,排除冲突包
- com.android.support冲突的解决办法
All com.android.support libraries must use the exact same version specification (mixing versions can ...
- android.support.design库的引用和冲突解决
android.support.design库的引用和冲突解决 转 https://www.jianshu.com/p/2a0a2af9f2b4 最近在工程中使用到android.support.de ...
- android support的作用及其常见错误的解决
*:first-child { margin-top: 0 !important; } body>*:last-child { margin-bottom: 0 !important; } /* ...
- Gradle 同步时报错,Could not find com.android.support.constraint:constraint-layout:1.0.0-alpha8的解决方法
Error:Could not find com.android.support.constraint:constraint-layout:1.0.0-alpha8. 原因: SDK 中可能是没有安装 ...
随机推荐
- VMware网络配置三种网络模式(桥接、NAT、Host-only)
VMware网络配置三种网络模式(桥接.NAT.Host-only) 一.虚拟安装后三种网络模式显示 当安装好后,的“虚拟网络编辑器”中也存在三种模式,分别对应:桥接-VMnet0.Host-only ...
- 再见 Docker,是时候拥抱下一代容器工具了
本文首发于:微信公众号「运维之美」,公众号 ID:Hi-Linux. 「运维之美」是一个有情怀.有态度,专注于 Linux 运维相关技术文章分享的公众号.公众号致力于为广大运维工作者分享各类技术文章和 ...
- HTML基础之HTML常用标签
下面小编为大家整理一些HTML的常用标签 a.布局标签 div标签定义文档中的分区或节(division/section),可以把文档分割为独立的.不同的部分,主要用于布局. aside标签的内容可用 ...
- Bash基础——内置命令
前言 Shell有很多内置在其源代码中的命令.由于命令是内置的,所以Shell不必到磁盘上搜索它们.内置命令执行速度更快,不同的Shell内置命令有所不同. 如何查找内置命令 之前查了好久怎么收索内置 ...
- 【OF框架】缓存Session/Cookies/Cache代码调用api,切换缓存到Redis
准备 缓存服务在应用开发中最常用的功能,特别是Session和Cookies,Cache部分业务开发过程会使用到. 在负载均衡环境下,缓存服务需要存储到服务器. 缓存默认实现在内存在,可以通过配置切换 ...
- Linux下Mysql服务安装【1】
https://www.cnblogs.com/xiaxiaoxu/p/9978976.html 第一步:获取mysql8.0的yum源 进入mysql官网获取RPM包下载地址 https://dev ...
- SpringBoot之多数据源动态切换数据源
原文:https://www.jianshu.com/p/cac4759b2684 实现 1.建库建表 首先,我们在本地新建三个数据库名分别为master,slave1,slave2,我们的目前就是写 ...
- thrift入门(1)
参考:https://www.jianshu.com/p/4723ce380b0e https://www.cnblogs.com/carlos-mm/p/6297197.html 一. 什么是Thr ...
- SpringBoot自动配置的魔法是怎么实现的
SpringBoot 最重要的功能就是自动配置,帮我们省去繁琐重复地配置工作.相信用过SpringBoot的人,都会被它简洁的步骤所惊讶.那么 SpringBoot 是如何实现自动配置的呢? 在这之前 ...
- SqlHelper助手
正在机房重构中,自己一直在摸索,刚开始听说SqlHelper只是感觉很高深,都不知道是用来做什么用的,只是看见别人的博客上写的可以用来帮助连接数据库.但自己没有什么特别的感觉,就认真的去查阅资料来具体 ...