android – Material TabLayout Access Issue-ThrowExceptions

Exception or error:

I am using support design version 28.0.0 in my app and trying to use material tablayout in XML.

unfortunatly i am unable to access it in XML. Any help is appreciated.

I have used
but now i want to use material tablayout as per new documentation

How to solve:

You have to include the Material Components library in your app build.gradle file:

  • If you’re using androidx:
implementation ''
  • If you’re not:
implementation ''

More information is available here:

Leave a Reply

Your email address will not be published. Required fields are marked *