在使用自定義Notificationd的時候報錯如下:
android.app.RemoteServiceException: Bad notification posted from package xxx: Couldn't expand RemoteViews for: StatusBarNotification
官方自定義通知欄RemoteViews只支持以下佈局和控件:
RemoteViews
支持的佈局:
AdapterViewFlipper
FrameLayout
GridLayout
GridView
LinearLayout
ListView
RelativeLayout
StackView
ViewFlipper
RemoteViews
支持的控件:
如果報上面的錯,自己查看自己的自定義通知欄佈局文件,除了上面列出來的容器和控件,其他控件容器包括自定義的控件也不可以。