集成小米插件包及小米推送包时编译报错:
已在项目中集成了 Jpush:
api 'cn.jiguang.sdk:jpush-google:4.5.0'
api 'cn.jiguang.sdk:jcore-google:3.0.0-release'
按照官方文档做的小米推送插件集成:https://docs.jiguang.cn//jpush/client/Android/mipush-Push-guide/#_3
引用的小米插件版本:
jpush-android-plugin-xiaomi-v4.5.0
MiPush_SDK_Client_4_8_2
集成之后编译报错:
Duplicate class cn.jpush.android.service.PluginXiaomiPlatformsReceiver found in modules jetified-jpush-android-plugin-xiaomi-v4.5.0 (jpush-android-plugin-xiaomi-v4.5.0.jar) and jetified-xiaomi-4.5.0-runtime (cn.jiguang.sdk.plugin:xiaomi:4.5.0)
Duplicate class cn.jpush.android.thirdpush.xiaomi.XMPushManager found in modules jetified-jpush-android-plugin-xiaomi-v4.5.0 (jpush-android-plugin-xiaomi-v4.5.0.jar) and jetified-xiaomi-4.5.0-runtime (cn.jiguang.sdk.plugin:xiaomi:4.5.0)
Duplicate class cn.jpush.android.thirdpush.xiaomi.a found in modules jetified-jpush-android-plugin-xiaomi-v4.5.0 (jpush-android-plugin-xiaomi-v4.5.0.jar) and jetified-xiaomi-4.5.0-runtime (cn.jiguang.sdk.plugin:xiaomi:4.5.0)
Duplicate class com.xiaomi.channel.commonutils.logger.LoggerInterface found in modules jetified-MiPush_SDK_Client_4_8_2 (MiPush_SDK_Client_4_8_2.jar) and jetified-xiaomi-4.5.0-runtime (cn.jiguang.sdk.plugin:xiaomi:4.5.0)
Duplicate class com.xiaomi.channel.commonutils.logger.a found in modules jetified-MiPush_SDK_Client_4_8_2 (MiPush_SDK_Client_4_8_2.jar) and jetified-xiaomi-4.5.0-runtime (cn.jiguang.sdk.plugin:xiaomi:4.5.0)
Duplicate class com.xiaomi.channel.commonutils.logger.b found in modules jetified-MiPush_SDK_Client_4_8_2 (MiPush_SDK_Client_4_8_2.jar) and jetified-xiaomi-4.5.0-runtime (cn.jiguang.sdk.plugin:xiaomi:4.5.0)
Duplicate class com.xiaomi.channel.commonutils.logger.b$a found in modules jetified-MiPush_SDK_Client_4_8_2 (MiPush_SDK_Client_4_8_2.jar) and jetified-xiaomi-4.5.0-runtime (cn.jiguang.sdk.plugin:xiaomi:4.5.0)
Duplicate class com.xiaomi.clientreport.data.Config found in modules jetified-MiPush_SDK_Client_4_8_2 (MiPush_SDK_Client_4_8_2.jar) and jetified-xiaomi-4.5.0-runtime (cn.jiguang.sdk.plugin:xiaomi:4.5.0)
Duplicate class com.xiaomi.clientreport.data.Config$Builder found in modules jetified-MiPush_SDK_Client_4_8_2 (MiPush_SDK_Client_4_8_2.jar) and jetified-xiaomi-4.5.0-runtime (cn.jiguang.sdk.plugin:xiaomi:4.5.0)