开发者社区> 问答> 正文

MessageReceiver无法收到消息推送

推送能在日志里面看到接收到了 但是后边会报错导致MessageReceiver无法收到推送消息 已经参考https://help.aliyun.com/knowledge_detail/67398.html 但是还是报错 2020-09-08 17:14:03.555 2759-2759/package E/MPS:CustomNotificationBuilder: no corresponding custom notificaiton 2020-09-08 17:14:03.558 2759-2759package E/EMASNAccs.AgooPushHandler: Notify message error: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.alibaba.sdk.android.push.notification.BasicCustomPushNotification.isBuildWhenAppInForeground()' on a null object reference at com.alibaba.sdk.android.push.notification.d.a(Unknown Source:30) at com.alibaba.sdk.android.push.MessageReceiver.showNotificationNow(Unknown Source:0) at com.aliyun.ams.emas.push.a.a(Taobao:104) at com.aliyun.ams.emas.push.AgooMessageReceiver.onReceive(Taobao:44) at com.alibaba.sdk.android.push.MessageReceiver.onReceive(Unknown Source:0) at android.app.ActivityThread.handleReceiver(ActivityThread.java:3413) at android.app.ActivityThread.access$1300(ActivityThread.java:201) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1685) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:201) at android.app.ActivityThread.main(ActivityThread.java:6821) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)

展开
收起
1262420415352458 2020-09-08 17:23:33 1559 0
1 条回答
写回答
取消 提交回答
  • 发现问题:在android端没有设置自定义Notification的情况下 后端不能要设置pushRequest.setAndroidNotificationBarType(1);//设置的通知样式ID,通知栏自定义样式范围0-100,否则报错,阿里云推送sdk需要优化这里的代码

    2020-09-09 09:54:50
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载