android.view.InflateException: Binary XML file line #34: Attempt to invoke virtual method 'boole

刚刚遇到了一个程序闪退问题,报错信息如下。   

android.view.InflateException: Binary XML file line #34: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
    Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:775)
        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:741)
        at android.view.LayoutInflater.rInflate(LayoutInflater.java:874)
        at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:835)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:423)

原因是我在XML中添加了view控件,但是我的view是这样的view,而不是这样的View所以导致崩溃,修改View之后问题修复。 

修复之前:

android.view.InflateException: Binary XML file line #34: Attempt to invoke virtual method 'boole_第1张图片

修复之后:

android.view.InflateException: Binary XML file line #34: Attempt to invoke virtual method 'boole_第2张图片

你可能感兴趣的:(Error)