2011-01-24 13 views
3
<?xml version="1.0" encoding="utf-8"?> 
<AbsoluteLayout 
android:id="@+id/widget41" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
xmlns:android="http://schemas.android.com/apk/res/android" 
> 

<TextView 
android:id="@+id/widget62" 
android:layout_width="300px" 
android:layout_height="292px" 
android:text="Patient education is an integral part of health care delivery across medical centers in developed countries thus encouraging active patient participation and ensuring far better compliance and patient satisfaction. It was this very dream that inspired Dr. Aniruddha and Dr. Anjali Malpani, who founded HELP in 1997, with a dream to make each and every individual in this country aware of his rights and responsibilities as a patient, of ways people could reduce the burden of health care expenses by planning and educating themselves "before" a serious medical problem could strike their family, and how doctors and patients could join hands to achieve health for all. What started as a resource center eleven years back, with a modest collection of material on patient education, in their day care center at Om Chambers, has grown into India's only largest patient education center housing more than 11,000 authentic books on possibly every aspect of health and diseases, along with pamphlets, health care magazines, and an exhaustive audiovisual section too" 
android:layout_x="10px" 
android:layout_y="32px" 
> 
</TextView> 


<Button 
android:id="@+id/widget63" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:text="Next" 
android:layout_x="130px" 
android:layout_y="352px" 
/> 

</AbsoluteLayout> 

이 오류가 발생하며 무엇이 잘못 되었나요?Android에서 Xml 오류가 발생했습니다.

Multiple annotations found at this line: - No grammar constraints (DTD or XML schema) detected for the document. - Element type "TextView" must be followed by either attribute specifications, ">" or "/>". - error: Error parsing XML: not well-formed (invalid token)

+1

'AbsoluteLayout'은 사용하지 말아야합니다. width와 height에'px'를 사용하지 말고'dp'를 사용하십시오. – Macarse

+0

이 줄에서 여러 개의 주석이 발견되었습니다. \t - 요소 유형 "TextView"다음에 특성 사양 인 ">"또는 "/>"이 와야합니다. \t - 오류 : XML 구문 분석 중 오류 발생 : 형식이 올바르지 않음 (잘못된 토큰) – theJava

답변

2

루트 노드의 xmlns-prefixed 속성은 파서가 만나는 첫 번째 것이어야합니다.

+0

이 부분에서 무엇을 변경해야합니까? – theJava

+1

'AbsoluteLayout'의 첫 번째 속성으로'xmlns : android = "http://schemas.android.com/apk/res/android"를 배치하십시오. – Macarse

+0

이 줄에서 여러 주석을 찾을 수 있습니다. - 요소 유형 "TextView"다음에는 특성 사양 인 ">"또는 "/>"이 와야합니다. - 오류 : XML을 구문 분석하는 중 오류가 발생했습니다 : 형식이 올바르지 않습니다 (유효하지 않은 토큰) 지금이 문제가 발생했습니다 ... – theJava

관련 문제