解决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 中可能是没有安装 ...
随机推荐
- unittest 运行slenium(四)---通过指定用例的形式运行用例
一: 说明 跟数据驱动唯一的区别为用例数据获取时,及运行方式不同. 其它都基本相同,可参考https://www.cnblogs.com/xiaodingdong/p/11753220.html 二: ...
- Python语言程序设计:Lab4
Programming 1.Analysing a Text File Look at the file xian_info.txt which is like this: Xi'an China 8 ...
- Django drf:手撸自定义跨域
项目需求: 1.用域名8000向8001发送请求,用django框架解决跨域问题 2.用上自定义中间件配置,支持get.post.put.detele和非简单请求 3.支持版本控制 4.在settin ...
- 基于STM32L476开发板的USB音频设备
现代音频设备中有很多知识产权. 我想研究创建一个与手机交互的算法设备(运行non-trivial算法的嵌入式设备). 我发现创建一个Lightning设备比创建一个连接到Android手机的的USB设 ...
- linux网络编程之posix共享内存
今天继续研究posix IPC对象,这次主要是学习一下posix共享内存的使用方法,下面开始: 下面编写程序来创建一个共享内存: 编译运行: 那posix的共享内存存放在哪里呢?上节中学的posix的 ...
- c++ 构造函数执行顺序
开辟内存空间. 按照成员变量声明的顺序开始构造成员变量. 如果成员变量在初始化列表中, 就会执行该变量类型的拷贝构造函数. 如果成员变量没有在初始化列表中, 就会执行该变量类型的缺省构造函数. 进入函 ...
- 源码安装部署redis
下载redis源码包 解压 编译安装 ./configure PREFIX=/data/apps/rediscd /data/apps/redismake && make instal ...
- SpringMVC返回类型
7.SpringMVC的返回值类型和参数传递 1.SpringMVC的返回值类型 (1)ModelAndView返回值类型: 1.1当返回为null时,页面不跳转. 1.2当返回值没有指定视图名时,默 ...
- Educational Codeforces Round 70
目录 Contest Info Solutions A. You Are Given Two Binary Strings... B. You Are Given a Decimal String.. ...
- 使用Keras训练神经网络备忘录
小书匠深度学习 文章太长,放个目录: 1.优化函数的选择 2.损失函数的选择 2.2常用的损失函数 2.2自定义函数 2.1实践 2.2将损失函数自定义为网络层 3.模型的保存 3.1同时保持结构和权 ...