android.app.RemoteServiceException:Bad notification posted from package com.android.administrator.myapplication: Couldn't expand RemoteViews for: StatusBarNotification
原因:在自定义notification布局时在RemoteViews的布局文件中使用了ConstraintLayout布局,而RemoteViews只支持一下组件,将不支持的组件替换成被支持的组件即可
Layout:
FrameLayout, LinearLayout, RelativeLayout
Component:
AnalogClock, Button, Chronometer, ImageButton, ImageView, ProgressBar, TextView, ViewFlipper, ListView, GridView, StackView, AdapterViewFlipper