在切换到AndroidX并启用style/Widget.MaterialComponents.TextInputLayout.OutlinedBox
后,出现了错误:无法膨胀类android.support.design.widget.TextInputLayout
。
大家好,今天我将我的项目切换到Androidx(需要一个新的库),但是我遇到了关于TextInputLayout
的错误。
请注意,当我删除了OulinedBox样式时,它可以完美编译,但我绝对需要它来完成这个项目。
是否有人知道如何让OulinedBox TextInputLayout样式与AndroidX一起使用?
非常感谢您的帮助和时间。
<android.support.design.widget.TextInputLayout
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="60dp"
android:layout_marginTop="20dp"
app:boxStrokeColor="@color/gradient_begin_purple">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/login"
android:textSize="20dp" />
</android.support.design.widget.TextInputLayout>