1

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
   android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".HelloActivity" >

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@string/hello_world" 
</textview>

Ahatius
  • 4,777
  • 11
  • 49
  • 79
user2395872
  • 11
  • 1
  • 1
  • 2
  • 1
    For starters, `` is missing a capital `T` and doesn't make sense if the line before it doesn't end with a `>`. Alternatively, use ``, so you don't need a separate closing tag. – MH. May 18 '13 at 04:25
  • Possible duplicate of [How to fix error: The markup in the document following the root element must be well-formed](https://stackoverflow.com/questions/46355454/how-to-fix-error-the-markup-in-the-document-following-the-root-element-must-be) – kjhughes Sep 22 '17 at 03:32

3 Answers3

1

Not a concrete question, but Is there a difference between 'valid xml' and 'well formed xml'? and http://www.w3.org/TR/REC-xml/#sec-well-formed may be of help.

Community
  • 1
  • 1
nitind
  • 19,089
  • 4
  • 34
  • 43
1

You forgot to end first TextView tag. The must be between the tags like this:

   <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:paddingBottom="@dimen/activity_vertical_margin"
        android:paddingLeft="@dimen/activity_horizontal_margin"
        android:paddingRight="@dimen/activity_horizontal_margin"
        android:paddingTop="@dimen/activity_vertical_margin"
        tools:context=".HelloActivity" >

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/hello_world" />
   </RelativeLayout>
Scott W
  • 9,742
  • 2
  • 38
  • 53
-1

Just replace the below code : -

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_world" 

with : -

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_world" />

If this works then please mark this answer as accepted.

Prashant M
  • 330
  • 2
  • 10