错误信息
android.view.InflateException: Binary XML file line #142 in com.bigdata.agricultureplatform:layout/fragment_home: Binary XML file line #142 in com.bigdata.agricultureplatform:layout/fragment_home: Error inflating class null
Caused by: android.view.InflateException: Binary XML file line #142 in com.bigdata.agricultureplatform:layout/fragment_home: Error inflating class null
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
有一种错是低级错误
你可能会以为什么butterKnife怎么t*的有出错了,其实不然,这种低级错误比较有针对性
下边是错误示范:
<view
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#943737"/>
错误就是fragment_xxxx.xml中使用View做分界线时候View首字母应该大写,小写的view就会出现错误,导致整个页面崩溃。
下边是正确示范: