安卓布局 Binary XML file line #0 神秘报错深坑

今天在写一个简单的不能再简单的页面布局,运行总是报错。

开始以为用的哪个控件声明有问题。找了良久。并没有结果。

一毛钱难倒富豪。

后来发现,布局文件的当做分割线来用的View元素,写成了view(小写)

<view
    android:id="@+id/line"
    app:layout_constraintTop_toBottomOf="@id/tv_skill1"
    android:background="@color/divider_line"
    android:layout_width="match_parent"
    android:layout_height="@dimen/dp_1"/>

之前也出现过这种低级错误,所以记录下。

猜你喜欢

转载自blog.csdn.net/thezprogram/article/details/79025372