module依赖冲突

最近对项目工程中的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'
    }

}

猜你喜欢

转载自blog.csdn.net/sinat_28496853/article/details/72819163