com.android.support版本冲突解决方法
- 作者: 无悔以前
- 来源: 51数据库
- 2020-08-18
在本篇文章里小编给大家整理的是关于com.android.support版本冲突解决方法以及相关知识点,需要的朋友们学习下。
项目中不同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' } } } }
以上就是相关全部知识点内容,
推荐阅读
热点文章
android中Bitmap用法(显示,保存,缩放,旋转)实例分析
12
android 仿微信聊天气泡效果实现思路
1
Android的尺度,drawable-xxxxxxx
2
Codeforces Round #656 (Div. 3) (C、D题)
1
Android之handler异步消息处理机制解析
6
GridView中图片显示出现上下间距过大,左右图片显示类似瀑布流的问题
0
AsyncTask的简单使用
5
两个简单Fragment之间的通信(三种方式)
18
uboot修改设置boot参数命令
41
android中实现从相册中一次性获取多张图片与拍照,并将选中的图片显示出来
2