2013-03-07 2 views
0

Я очень новичок в XML, и я просто изучаю его для случая развития Android. Но IDE построила серию TextViews и EditTexts, и два из них дают мне «xml ошибка синтаксического анализа xml: не очень хорошо сформированная» ошибка (textView1 и editText2). Я спросил своих сверстников и инструкторов, но никто не слишком уверен в том, что идет не так. Вся помощь приветствуется и благодарит заранее.android xml ошибка синтаксического анализа xml: не совсем сформирована

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:weightSum="100" 
    android:orientation="vertical" > 
    <ScrollView android:layout_weight="30" android:layout_width="fill_parent" android:layout_height="fill_parent"> 
    <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> 

    <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="TextView" /> 

    <EditText android:id="@+id/editText1" android:layout_width="match_parent" android:layout_height="wrap_content" android:ems="10" > 
    </EditText> 

    <TextView android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="TextView" /> 

    <EditText android:id="@+id/editText2"android:layout_width="match_parent" android:layout_height="wrap_content" android:ems="10" /> 

    <TextView android:id="@+id/textView3"android:layout_width="wrap_content" android:layout_height="wrap_content"android:text="TextView" /> 

    <EditText android:id="@+id/editText3"android:layout_width="match_parent" android:layout_height="wrap_content" android:ems="10" /> 

    <TextView android:id="@+id/textView4"android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="TextView" /> 

    <EditText android:id="@+id/editText4" android:layout_width="match_parent"android:layout_height="wrap_content"android:ems="10" /> 

    <TextView android:id="@+id/textView5"android:layout_width="wrap_content"android:layout_height="wrap_content"android:text="TextView" /> 

    <EditText android:id="@+id/editText5"android:layout_width="match_parent"android:layout_height="wrap_content"android:ems="10" /> 

    <TextView android:id="@+id/textView6"android:layout_width="wrap_content"android:layout_height="wrap_content"android:text="TextView" /> 

    <EditText android:id="@+id/editText6"android:layout_width="match_parent"android:layout_height="wrap_content"android:ems="10" /> 
    </LinearLayout> 
    </ScrollView> 
    <LinearLayout android:layout_width="match_parent" 
    android:layout_height="fill_parent)" 
    android:orientation="vertical" 
    android:layout_weight="40"> 
    <Button android:id="@+id/button1"android:layout_width="wrap_content"android:layout_height="wrap_content"android:text="Button" /> 
    </LinearLayout> 
    <LinearLayout android:layout_width="match_parent" 
    android:layout_height="fill_parent" 
    android:orientation="vertical" 
    android:layout_weight="30"> 
    <AnalogClock android:id="@+id/analogClock1" android:layout_width="wrap_content"android:layout_height="wrap_content" /> 
    </LinearLayout> 
</LinearLayout> 

ответ

4

Ваша ошибка эта строка:

 android:layout_height="fill_parent)" 

В своем первом внутрипартийной LinearLayout. Вы должны забрать «)», конечно.

По какой-то причине редактор не дает правильную строку ошибки. При использовании Eclipse вы должны использовать Ctrl (/ apple) + shift + F. Он будет автоматически форматировать ваш файл. После этого ошибка была легко обнаружена.

пс. Используйте match_parent вместо fill_parent, fill_parent устарел.

+1

спасибо! – vamp658

Смежные вопросы

 Смежные вопросы