关于Multiple dex files define Lcom/qq/taf/jce/JceDisplayer

当同时引用腾讯直播和信鸽推送的依赖时候安装应用会出现以下错误:

Multiple dex files define Lcom/qq/taf/jce/JceDisplayer;

信鸽的依赖代码如下:

   //信鸽jar
    compile'com.tencent.xinge:xinge:3.2.6-release'
    //jg包
    compile'com.tencent.jg:jg:1.1'
    //wup包 com.tencent.ilivesdk依赖库里面已经有了这个库,再次使用的话会出现重复依赖的问题
    compile 'com.tencent.wup:wup:1.0.0.E-release'
    //mid包
    compile 'com.tencent.mid:mid:4.0.6-release'

腾讯直播依赖如下:

    compile 'com.tencent.ilivesdk:ilivesdk:1.5.2.0.6'
    compile 'com.tencent.callsdk:callsdk:1.0.16'

这里只看依赖的话并没有看出相同的部分,但是当我们查看com.tencent.ilivesdk:ilivesdk的依赖列表的时候,就会发现问题,截图如下:
关于Multiple dex files define Lcom/qq/taf/jce/JceDisplayer
由此可以知道有重复依赖,解决办法有三种:
1、信鸽推送依赖不再引用com.tencent.wup依赖,具体代码如下:

   //信鸽jar
    compile'com.tencent.xinge:xinge:3.2.6-release'
    //jg包
    compile'com.tencent.jg:jg:1.1'
    //wup包 com.tencent.ilivesdk依赖库里面已经有了这个库,再次使用的话会出现重复依赖的问题
    //compile 'com.tencent.wup:wup:1.0.0.E-release'
    //mid包
    compile 'com.tencent.mid:mid:4.0.6-release'

2、使用exclude进行去除重复依赖:

compile (com.tencent.ilivesdk:ilivesdk:1.5.2.0.6')
            {
                exclude group: 'com.tencent.wup'
            }

拓展链接:
https://blog.****.net/pkaq_/article/details/53906668
备注:当出现类似问题时候也可以采取同样排查方式进行排查问题