support-v4、support-v7 的依赖关系及 Getting java.util.zip.Zi
发布时间:2020-12-14 01:38:08 所属栏目:百科 来源:网络整理
导读:最近在编译项目时,多次出现了 java.util.zip.ZipException: duplicate entry exception android/support/vX/.../xxx.class 异常;该异常是由于多个 module 或 第三方库(这个是主要原因)引用了不同版本的 support 库引起的;为了解决这个问题顺带把 Androi
最近在编译项目时,多次出现了 java.util.zip.ZipException: duplicate entry exception android/support/vX/.../xxx.class 异常; 该异常是由于多个 module 或 第三方库(这个是主要原因)引用了不同版本的 support 库引起的;为了解决这个问题顺带把 Android support 库和 几个第三方库的依赖关系整理如下: 1.support-v7 的依赖关系compile ("com.android.support:appcompat-v7:$SUPPORT_APPCOMPAT_V7_VERSION"){
exclude group:'com.android.support',module:'support-v4'
exclude group:'com.android.support',module:'support-annotations'
exclude group:'com.android.support',module:'support-compat'
exclude group: 'com.android.support',module: 'support-vector-drawable'
exclude group:'com.android.support',module:'animated-vector-drawable'
}
compile ("com.android.support:recyclerview-v7:$SUPPORT_RECYCLERVIEW_V7"){
exclude group:'com.android.support',module:'support-compat'
exclude group:'com.android.support',module:'support-core-ui'
}
2.support-v13 的依赖关系compile ("com.android.support:support-v13:$SUPPORT_V13"){
exclude group:'com.android.support',module:'support-core-ui'
exclude group:'com.android.support',module:'support-core-utils'
exclude group:'com.android.support',module:'support-fragment'
exclude group:'com.android.support',module:'support-media-compat'
exclude group: 'com.android.support',module: 'recyclerview-v7'
}
3.transition 的依赖关系compile ("com.android.support:transition:$TRANSITION_VERSION"){
exclude group:'com.android.support',module:'support-media-compat'
exclude group:'com.android.support',module:'animated-vector-drawable'
}
4.design 的依赖关系compile("com.android.support:design:$DESIGN_VERSION") {
exclude group:'com.android.support',module:'animated-vector-drawable'
exclude group: 'com.android.support',module: 'support-vector-drawable'
exclude group: 'com.android.support',module: 'transition'
exclude group:'com.android.support',module:'appcompat-v7'
exclude group: 'com.android.support',module: 'recyclerview-v7'
}
5.constraint 的依赖关系compile ('com.android.support.constraint:constraint-layout:1.0.2'){
exclude group:'com.android.support',module:'support-v4'
}
6.multidex 的依赖关系compile ("com.android.support:multidex:$SUPPORT_MULTIDEX"){
exclude group:'com.android.support',module:'support-v4'
}
7.com.yuyh.imgsel(github上一图片选择器) 的依赖关系compile ('com.yuyh.imgsel:library:1.3.8'){
exclude group:'com.android.support',module: 'recyclerview-v7'
}
8.ch.acra 的依赖关系compile ('ch.acra:acra:4.9.1'){
exclude group:'com.android.support',module:'support-v4'
}
参考资料关于 support-v4、support-v7 内部的构成可以看下面两篇 blog : Android Support Library详细介绍 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- cocos2d-x-3.x-026 移植cocos的jnihelper及用法说明
- c# – Kendo Grid导出到Excel货币格式
- reactjs – React Native – CSS:没有边框的last-child?
- Oracle Error Code Reference Library
- c# – 如何在__MigrationHistory表中添加其他列?
- Flash ActionScript3.0基础+进阶实战开发配两个项目(解除冰
- react-native – 从React native中的本地json文件导入文本
- ajax读取本地xml文件要注意的地方
- ruby-on-rails-4 – Rails 4 – 强大的参数概念参与spree-2
- 具有变量列表的聚合函数