当前位置:   article > 正文

Error inflating class com.google.android.material.bottomnavigation.BottomNavigationView

error inflating class com.google.android.material.bottomnavigation.bottomnav

Caused by: android.view.InflateException: Binary XML file line #17: Error inflating class com.google.android.material.bottomnavigation.BottomNavigationView
Caused by: java.lang.reflect.InvocationTargetException

Caused by: java.lang.IllegalArgumentException: width and height must be > 0

at com.google.android.material.bottomnavigation.BottomNavigationItemView.setIcon(BottomNavigationItemView.java:347)

原因:menu-->item-->icon 使用了mipmap里的文件

解决:menu文件里item-->icon属性值必须为drawable文件夹里

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Monodyee/article/detail/235525?site
推荐阅读
相关标签
  

闽ICP备14008679号