Error inflating class com.google.android.material.textfield.TextInputLayout

I implemented this:

implementation 'com.google.android.material:material:1.0.0'

Then I changed the style from:

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">

To:

<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">

Try in parent layout apply this style:

android:theme="@style/Theme.MaterialComponents.DayNight.DarkActionBar"

   <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:layout_marginLeft="20dp"
        android:layout_marginRight="20dp"
        android:orientation="vertical"
        android:theme="@style/Theme.MaterialComponents.DayNight.DarkActionBar">
        <com.google.android.material.textfield.TextInputLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
        <com.google.android.material.textfield.TextInputEditText
       
        </com.google.android.material.textfield.TextInputLayout>
   </LinearLayout>

This is an example,for complete using, put in your app style the parent,Exemple:

<style name="MyApp" parent="Theme.MaterialComponents">