I have a com.google.android.material.button.MaterialButton component in one of my layout file and I get this error when I am using the latest version of the Material Compone
if your theme does not extend MaterialComponents theme, and you want to keep the AppCompat theme, use a bridge theme, that would allow you to use material components keeping the AppCompat theme.