InflateException when using TextInputLayout(使用 TextInputLayout 时出现 InflateException)
问题描述
我正在尝试使用 Material Design 中的 TextInputEditText (https://github.com/material-components/material-components-android/blob/master/docs/components/TextInputLayout.md),我遇到了运行时异常.
I'm trying to use TextInputEditText from Material Design (https://github.com/material-components/material-components-android/blob/master/docs/components/TextInputLayout.md) and I'm getting runtime exception.
这是运行日志的一部分:
This's part of run log:
我通过 DexPathList 剪切了这个日志,其中包含许多 apk 文件的路径,例如:
I cut this log by DexPathList that contains many paths to apk files, like:
我的 xml 文件:
我的 build.gradle 依赖:
My build.gradle dependences:
推荐答案
在我现有的项目中实现 AndroidX 时遇到了这个问题.
Faced this issue when implementing AndroidX in my existing project.
布局 XML
旧式
新风格
这篇关于使用 TextInputLayout 时出现 InflateException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!