Crash when using ConstraintLayout in Notification

RemoteView can only support the following layout classes:

FrameLayout

LinearLayout

RelativeLayout

GridLayout

As mentioned here


A RemoteViews object (and, consequently, an App Widget) can support the following layout classes:

  • FrameLayout
  • LinearLayout
  • RelativeLayout
  • GridLayout

And the following widget classes:

  • AnalogClock
  • Button
  • Chronometer
  • ImageButton
  • ImageView
  • ProgressBar
  • TextView
  • ViewFlipper
  • ListView
  • GridView
  • StackView
  • AdapterViewFlipper

Descendants of these classes are not supported.

Read more: https://developer.android.com/guide/topics/appwidgets/index.html#CreatingLayout