Android cannot resolve Material Components

Both of answers are right but i found an error by the codelabs given code on this link https://codelabs.developers.google.com/codelabs/mdc-111-kotlin/#2 The OutlineBox is misspelled the correct code is

style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"

If you use new packaging for support libraries you should use:

com.google.android.material:material:1.0.0-beta01 dependency for that


The Material Components have not yet shipped new releases under the com.android.support:design dependency as of yet (or via any other official dependency you can include in your build.gradle file) so what you're seeing in 27.0.2 does not contain any of the recent changes - such as support for Widget.MaterialComponents.TextInputLayout.OutlineBox.

You'll have to copy the portions of the Material Components library you want directly into your project if you want access to the latest changes.