3

このエラーメッセージが表示され続ける理由がわかりません。

この行に複数の注釈が見つかりました:

  • ルート要素に続くドキュメントのマークアップは整形式である必要があります。
  • エラー:XMLの解析エラー:ドキュメント要素の後のジャンク

エラーは、以下の冒頭にあります。

LinearLayout 
android:orientation="vertical"
android:layout_weight="30"
android:layout_width="fill_parent"
android:layout_height="fill_parent"

XML:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" 
android:weightSum="100">
<ScrollView android:layout_weight="30" android:layout_width="fill_parent"  
android:layout_height="fill_parent">
<LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="fill_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="fill_parent"
    android:layout_height="wrap_content"
    android:ems="10"/>

<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="fill_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="fill_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="fill_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="fill_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="fill_parent"
    android:layout_height="wrap_content"
    android:ems="10" />
    </LinearLayout>
</ScrollView>

<LinearLayout
    android:layout_weight="40"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical"/>

<Button android:id="@+id/button1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Button"/>
</LinearLayout>

<LinearLayout 
android:orientation="vertical"
android:layout_weight="30"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>

<AnalogClock
android:id="@+id/analogClock1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>

</LinearLayout>
</LinearLayout>
4

1 に答える 1

3
<LinearLayout
android:layout_weight="40"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"/>

 <Button android:id="@+id/button1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Button"/>
</LinearLayout>

/LinearLayoutの開始タグに余分なものがあります

次のLinearLayoutグループにも1つあります

于 2012-06-04T01:14:54.553 に答える