打算更新推送SDK,但是更新之后出问题了.现在只能回退回去.
- 厂商推送后台查询到是推送成功了,实际并没有通知.所有通知权限开启的.(目前我用的小米)
- 推送查询到推送成功,但是没法显示通知.错误Can't create handler inside thread that has not called Looper.prepare()
所用的是夜神模拟器,系统 Android 7.1.2.
真机6.0也有此问题,应该与系统版本没啥关系.
使用gradle集成,
配置了服务,继承自JCommonService:api 'cn.jiguang.sdk:jpush:3.3.4' api 'cn.jiguang.sdk:jcore:2.1.2' api 'cn.jiguang.sdk.plugin:xiaomi:3.2.0' // 小米 api 'cn.jiguang.sdk.plugin:huawei:3.2.1' // 华为 api 'cn.jiguang.sdk.plugin:meizu:3.2.0' // 魅族
下边是从App打开,到推送下发后不显示通知的详细日志:<service android:name="com.jpush.customer.CustomerServices" android:enabled="true" android:exported="false" android:process=":pushcore"> <intent-filter> <action android:name="cn.jiguang.user.service.action"/> </intent-filter> </service>
2019-07-30 14:39:34.190 22288-22359/com.mytek.izzb:pushcore D/JIGUANG-JPush: [ActionHelper] doAction:change_foreground 2019-07-30 14:39:34.191 22288-22364/com.mytek.izzb:pushcore D/JIGUANG-JPush: [CustomGeofenAction] start listen geofence 2019-07-30 14:39:34.191 22288-22364/com.mytek.izzb:pushcore D/JIGUANG-JPush: [CustomGeofenAction] No geofence,not need listen 2019-07-30 14:39:35.587 22288-22359/com.mytek.izzb:pushcore D/JIGUANG-JPush: [ActionHelper] doAction:tagalis 2019-07-30 14:39:35.592 22288-22364/com.mytek.izzb:pushcore D/JIGUANG-JPush: [TagAliasHelper] tagalias:{"platform":"a","op":"set","alias":"hzalias4586"} 2019-07-30 14:39:36.248 22288-22441/com.mytek.izzb:pushcore D/JIGUANG-JPush: [ActionHelper] doAction:msg 2019-07-30 14:39:36.248 22288-22364/com.mytek.izzb:pushcore D/JIGUANG-JPush: [JPushActionImpl] action:handleMsg:JPushResponse{cmd=29, rid=7417, rquestId=2} 2019-07-30 14:39:36.516 22425-22499/com.mytek.izzb I/(L:jpush:: error:0 2019-07-30 14:39:47.799 22288-22441/com.mytek.izzb:pushcore D/JIGUANG-JPush: [ActionHelper] doAction:msg 2019-07-30 14:39:47.800 22288-22364/com.mytek.izzb:pushcore D/JIGUANG-JPush: [JPushActionImpl] action:handleMsg:JPushResponse{cmd=3, rid=0, rquestId=-1} 2019-07-30 14:39:47.850 22288-22364/com.mytek.izzb:pushcore W/JIGUANG-JPush: [MessageHelper] no message or extra send to user 2019-07-30 14:39:47.886 22288-22583/com.mytek.izzb:pushcore E/JIGUANG-JPush: [NotificationHelper] showNotification failed:Can't create handler inside thread that has not called Looper.prepare()