module依赖冲突

来源:互联网 发布:手机可以做淘宝客吗 编辑:程序博客网 时间:2024/06/07 14:03

最近对项目工程中的module模块统一梳理,在打包过程中发现下面的一些错误信息,如下:

Execution failed for task ':excelSior:packageAllDebugClassesForMultiDex'.> java.util.zip.ZipException: duplicate entry: android/support/v4/util/TimeUtils.class
这表示module中肯定依赖了重复的v4包,但是由于项目开发某些原因,无法剥离这部分冲突的jar包,因此采用下面的解决方案
android{     ........................... 
    configurations {        all*.exclude group: 'com.android.support', module: 'support-v4'        all*.exclude group: 'com.android.support', module: 'support-annotations'    }}