Search code examples
androidxmlprefix

Receive parsing XML: unbound prefix error and Attribute is missing the Android namespace prefix


I receive the error messages:

error: Error parsing XML: unbound prefix

Attribute is missing the Android namespace prefix

I do not understand why.

<LinearLayout 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:orientation="horizontal"

    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=".MainActivity" >

<EditText
    android:id="@+id/edit_message"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:layout_weight="1"
    android:ems="10"
    android:hint="@string/edit_message"
    android:inputType="textPersonName" >

</EditText>

<Button
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@string/button_send"/>

</LinearLayout>

Solution

  • Try this..

    android spelling is wrong andriod that why Attribute is missing the Android namespace prefix in this andriod:hint="@string/edit_message" line

    android:hint="@string/edit_message"