Bad notification posted - Couldn't expand RemoteViews for: StatusBarNotification

前端 未结 15 2003
执笔经年
执笔经年 2020-12-03 06:47

I am trying to post a notification with a custom view in the notification area from an IntentService, and getting the Couldn\'t expand RemoteView e

15条回答
  •  -上瘾入骨i
    2020-12-03 07:04

    For me the problem was having a View item in the custom layout set for the custom notification. Removing the View item from the layout solved the problem of the Bad Notification Posted.

    Here's a list of layout items which can be used, if you want to create a custom notification using RemoteView.

    Neither cleaning project nor setting the layout_height as match_parent worked for me.

提交回复
热议问题