Rameel Hashmi
Rameel Hashmi

Reputation: 13

android activity error in activity file

<

FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/container"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.example.dialog.MainActivity"
    tools:ignore="MergeRootFrame" />


<Button
android:id="@+id/btn_dialog"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/button_send"
android:onClick="onClick" />

</FrameLayout>

The markup in the document following the root element must be well-formed. i am having this error...Done lot of things but can't sort out HELP!!

Upvotes: 0

Views: 55

Answers (1)

An SO User
An SO User

Reputation: 25028

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools" 
    android:id="@+id/container" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    tools:context="com.example.dialog.MainActivity" 
    tools:ignore="MergeRootFrame" />   

You have closed your FrameLayout by using />. Remove the slash:

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools" 
    android:id="@+id/container" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    tools:context="com.example.dialog.MainActivity" 
    tools:ignore="MergeRootFrame" >  

Upvotes: 2

Related Questions