- Unexpected text found in layout file: "/>"
- The element type "LinearLayout" must be terminated by the
matching end-tag "</LinearLayout>".
改正:将Linearlayout改成LinearLayout后报错消失。
以下是嵌套的一个线性布局:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="#00ff00">
<Button
android:layout_width="wrap_content"
android:layout_weight="2"
android:layout_height="0dip"
android:text="4"
/>
<Button
android:layout_width="wrap_content"
android:layout_weight="1"
android:layout_height="0dip"
android:text="5"
/>
/></LinearLayout>
上下两个都要写成LinearLayout,写成Linearlayout都会报错