美文网首页
Material Design —— Error inflati

Material Design —— Error inflati

作者: ProgrammingGuy | 来源:发表于2019-11-05 23:12 被阅读0次

导入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