2020-01-07

2020-01-07  本文已影响0人  CVD

1. Process: com.xxxx.xxxx, PID: 17736

    android.view.InflateException: Binary XML file line #104: Binary XML file line #104: Error inflating class com.xxxx.xxxx.widget.MenuItemView

    Caused by: android.view.InflateException: Binary XML file line #104: Error inflating class com.xxxx.xxxx.widget.MenuItemView

    Caused by: java.lang.reflect.InvocationTargetException

这种情况下看不到具体的出错原因的时候,可以把这个自定义的view/viewGroup, 放到Activity中的布局文件下, 重新run,错误栈中就会打印出详细的错误信息、

2. LayoutParams 的 width , height , 单位都是dp, 一般情况下,不需要再做转化了

上一篇 下一篇

猜你喜欢

热点阅读