I have bellow xml:
xml
implementation 'com.google.android.material:material:1.0.0' classpath 'com.android.tools.build:gradle:3.2.0'
If you have added the above two conditions and it's still showing the error you can try a "LinearLayout" instead.