导入Material Design的依赖包后,在xml中将Button替换为MaterialButton,直接运行会出现error inflating MaterialButton的错误,原因是未将整个应用主题设置为Material Design,在styles.xml中将AppTheme改为
<style name="AppTheme" parent="Theme.MaterialComponents.Light.DarkActionBar">
导入Material Design的依赖包后,在xml中将Button替换为MaterialButton,直接运行会出现error inflating MaterialButton的错误,原因是未将整个应用主题设置为Material Design,在styles.xml中将AppTheme改为
<style name="AppTheme" parent="Theme.MaterialComponents.Light.DarkActionBar">
本文标题:Material Design —— Error inflati
本文链接:https://www.haomeiwen.com/subject/grkybctx.html
网友评论