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
Got stucked in this error even if my theme extends Theme.MaterialComponents
. I was creating Chips like this :Chip chip = new Chip(getActivity().getBasecontext(), null, R.attr.CustomChipChoice);
.
The solution is to change it to Chip chip = new Chip(getActivity(), null, R.attr.CustomChipChoice);
.
Hope it helps.