Android XML Error parsing XML: junk after document element

you should encapsule your elements in layouts, such as LinearLayout. You can look at a layout config file in existence.


An XML document can only have 1 root element. You have 3 such elements. You should enclose your TextView elements inside a layout, such as a LinearLayout:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:orientation="vertical"
              android:layout_width="match_parent"
              android:layout_height="match_parent">

    <!-- TextView elements here -->

</LinearLayout>

Remove the xmlns attribute on the first TextView element.

Tags:

Xml

Android