TencentCloud / TPNS-Flutter-Plugin

MIT License
61 stars 35 forks source link

Android 12 收到推送后报错 #28

Closed lxrmido closed 2 years ago

lxrmido commented 2 years ago

W/TPush (30240): [MessageHelper] showNotification Throwable: W/TPush (30240): java.lang.IllegalArgumentException: com.xxx.xxx: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. W/TPush (30240): Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles. W/TPush (30240): at android.app.PendingIntent.checkFlags(PendingIntent.java:375) W/TPush (30240): at android.app.PendingIntent.getActivityAsUser(PendingIntent.java:458) W/TPush (30240): at android.app.PendingIntent.getActivity(PendingIntent.java:444) W/TPush (30240): at android.app.PendingIntent.getActivity(PendingIntent.java:408) W/TPush (30240): at com.tencent.android.tpush.message.b.a(ProGuard:461) W/TPush (30240): at com.tencent.android.tpush.message.b.a(ProGuard:1053) W/TPush (30240): at com.tencent.android.tpush.message.PushMessageManager.showNotifacition(ProGuard:109) W/TPush (30240): at com.tencent.android.tpush.message.e$a.run(ProGuard:274) W/TPush (30240): at android.os.Handler.handleCallback(Handler.java:938) W/TPush (30240): at android.os.Handler.dispatchMessage(Handler.java:99) W/TPush (30240): at android.os.Looper.loopOnce(Looper.java:210) W/TPush (30240): at android.os.Looper.loop(Looper.java:299) W/TPush (30240): at android.os.HandlerThread.run(HandlerThread.java:67)

stevenxiaowen commented 2 years ago

您好,此问题属于 Android 12 兼容问题。我们已经上传分支版本 V1.1.6 解决此问题,请您更新使用。