Android布局里的蜜汁老花眼坑,存个档防止二次踩。
1、View和view
自定义一个分割线,写了个v就直接敲了回车,运行时候一路报错:
报错的一行是27:
????
查布局查了好久,没找到为什么。然后逐行注释找,发现问题。
<view
android:layout_width="1dp"
android:background="@color/black"
android:layout_height="match_parent"/>
正确写法:
<View
android:layout_width="1dp"
android:background="@color/black"
android:layout_height="match_parent"/>