[英]EError parsing XML: mismatched tags
I'm trying to write an app on Eclipse. 我正在尝试在Eclipse上编写应用程序。 After change the scale type to matrices a parsing xml error appeared and it say its in line 169 but i cant see any error.
将比例类型更改为矩阵后,出现解析XML错误,它在第169行中说其错误,但我看不到任何错误。 I've looked up similar questions, but none are similar enough for me to know how to fix mine.
我查找了类似的问题,但是没有一个问题足以让我知道如何解决我的问题。 I've looked through out my manifest and can't seem to find where the mismatched tag is.
我查看了清单,似乎找不到匹配的标签在哪里。
Edit: I have tried the solutions given by you guys but the problem is still there. 编辑:我已经尝试了你们给的解决方案,但问题仍然存在。
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/editFormLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#FFF"
android:orientation="vertical" >
<ScrollView
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/scrollView"
android:layout_weight="1"
android:padding="5px">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ImageView
android:id="@+id/imageView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:adjustViewBounds="true"
android:src="@drawable/formprepost"
/>
<EditText
android:id="@+id/name"
android:layout_width="400dp"
android:layout_height="35dp"
android:layout_alignParentRight="true"
android:layout_below="@+id/include1"
android:layout_marginRight="90dp"
android:layout_marginTop="134dp"
android:background="#0000"
android:ellipsize="start"
android:inputType="textCapWords|textPersonName"
android:lines="1"
android:maxLines="1"
android:textAppearance="@style/TextStyle1" />
<EditText
android:id="@+id/school"
android:layout_width="400dp"
android:layout_height="35dp"
android:layout_marginTop="-8dp"
android:layout_alignLeft="@+id/name"
android:inputType="textCapWords|textPersonName"
android:background="#0000"
android:textAppearance="@style/TextStyle1"
android:ellipsize="start"
android:maxLines = "1"
android:lines = "1"
android:layout_below="@+id/name" />
<EditText
android:id="@+id/psupervisor"
android:layout_width="400dp"
android:layout_height="35dp"
android:layout_marginTop="-9dp"
android:layout_alignLeft="@+id/school"
android:inputType="textCapWords|textPersonName"
android:background="#0000"
android:textAppearance="@style/TextStyle1"
android:ellipsize="start"
android:maxLines = "1"
android:lines = "1"
android:layout_below="@+id/school" />
<EditText
android:id="@+id/pdate"
android:layout_width="200dp"
android:layout_height="35dp"
android:layout_alignParentLeft="true"
android:layout_below="@+id/psupervisor"
android:layout_marginLeft="185dp"
android:inputType="textCapWords|textPersonName"
android:textAppearance="@style/TextStyle1"
android:background="#0000"
android:ellipsize="start"
android:maxLines="1"
android:layout_marginTop="116dp"/>
<CheckBox
android:id="@+id/ptick1"
android:layout_width="540dp"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:button="@drawable/checkbox_selector"
android:layout_below="@+id/pdate"
android:layout_marginLeft="154dp"
android:layout_marginTop="43dp"/>
<CheckBox
android:id="@+id/ptick2"
android:layout_width="240dp"
android:layout_height="wrap_content"
android:layout_marginTop="-11dp"
android:layout_alignLeft="@+id/ptick1"
android:button="@drawable/checkbox_selector"
android:layout_below="@+id/ptick1"/>
<CheckBox
android:id="@+id/ptick3"
android:layout_width="270dp"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/ptick2"
android:layout_marginTop="-12dp"
android:button="@drawable/checkbox_selector"
android:layout_below="@+id/ptick2" />
<EditText
android:id="@+id/pcomment1"
android:layout_width="600dp"
android:layout_height="180dp"
android:layout_alignParentLeft="true"
android:layout_alignRight="@+id/tick1"
android:layout_below="@+id/ptick3"
android:layout_marginLeft="94dp"
android:layout_marginTop="23dp"
android:scrollbars="vertical"
android:gravity="top|left"
android:inputType="textCapSentences|textMultiLine"
android:textAppearance="@style/TextStyle1" />
<EditText
android:id="@+id/pcomment2"
android:layout_width="614dp"
android:layout_height="165dp"
android:layout_alignLeft="@+id/pcomment1"
android:layout_alignRight="@+id/pcomment1"
android:layout_below="@+id/pcomment1"
android:layout_marginTop="90dp"
android:scrollbars="vertical"
android:gravity="top|left"
android:inputType="textCapSentences|textMultiLine"
android:textAppearance="@style/TextStyle1" />
<ImageButton
android:id="@+id/psignature1"
android:layout_width="170dp"
android:layout_height="35dp"
android:layout_alignLeft="@+id/pdate"
android:layout_below="@+id/pcomment1"
android:layout_marginLeft="49dp"
android:background="#0000" />
<ImageButton
android:id="@+id/psignature2"
android:layout_width="170dp"
android:layout_height="30dp"
android:layout_alignLeft="@+id/psupervisor"
android:layout_below="@+id/pcomment2"
android:background="#0000" />
</RelativeLayout>
</ScrollView></RelativeLayout>
You have not added end tag for two EditText
for school id and psupervisor id: 您尚未为学校 ID和psupervisor ID添加两个
EditText
结束标签:
<EditText
android:id="@+id/school"
android:layout_width="400dp"
android:layout_height="35dp"
android:layout_marginTop="-8dp"
android:layout_alignLeft="@+id/name"
android:inputType="textCapWords|textPersonName"
android:background="#0000"
android:textAppearance="@style/TextStyle1"
android:ellipsize="start"
android:maxLines = "1"
android:lines = "1"
android:layout_below="@+id/name" /> // Here
<EditText
android:id="@+id/psupervisor"
android:layout_width="400dp"
android:layout_height="35dp"
android:layout_marginTop="-9dp"
android:layout_alignLeft="@+id/school"
android:inputType="textCapWords|textPersonName"
android:background="#0000"
android:textAppearance="@style/TextStyle1"
android:ellipsize="start"
android:maxLines = "1"
android:lines = "1"
android:layout_below="@+id/school" /> // Here
Also, you need to use : 另外,您需要使用:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/editFormLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#FFF"
android:orientation="vertical" > // Remove /> from here
Try this.. 尝试这个..
Your ended main RelativeLayout
in starting itself like />
您结束的主要
RelativeLayout
本身就像/>
一样开始
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/editFormLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#FFF"
android:orientation="vertical" >
and also you have not close EditText
for school
and psupervisor
id's just you have mention as >
end like />
or </EditText>
而且您还没有关闭针对
school
和psupervisor
ID的EditText
,只是您提到了>
例如/>
或</EditText>
<EditText
android:id="@+id/school"
android:layout_width="400dp"
android:layout_height="35dp"
android:layout_marginTop="-8dp"
android:layout_alignLeft="@+id/name"
android:inputType="textCapWords|textPersonName"
android:background="#0000"
android:textAppearance="@style/TextStyle1"
android:ellipsize="start"
android:maxLines = "1"
android:lines = "1"
android:layout_below="@+id/name" />
<EditText
android:id="@+id/psupervisor"
android:layout_width="400dp"
android:layout_height="35dp"
android:layout_marginTop="-9dp"
android:layout_alignLeft="@+id/school"
android:inputType="textCapWords|textPersonName"
android:background="#0000"
android:textAppearance="@style/TextStyle1"
android:ellipsize="start"
android:maxLines = "1"
android:lines = "1"
android:layout_below="@+id/school" />
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.