慢慢拾起该有的情怀,不忘初心。
在不知为嘛的情况下,突然发现,项目中XML布局文件中CheckBox 报错,搞什么飞机>>>>>>>>>>>>>>>>>>>>>>
先看报错信息:
android.view.InflateException: Binary XML file line #334: Error inflating class android.widget.CheckBox
再去看布局文件,发现没有问题啊,无论怎么改属性,改布局,都一直报这个错,摔锅~~~~~~~~~~~~~~~~~~~~~~~~~~
百度一番,google一番--------------------------------------------
解决方案:
引入V7包中的AppCompatCheckBox。
<android.support.v7.widget.AppCompatCheckBox
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/crime_solved"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:text="@string/crime_solved_label"/>
转载请注明出处:http://blog.csdn.NET/qq_33078541?viewmode=contents
欢迎回复继续咨询或分享更好的解决方案~~