0
 <TableRow
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="3dp"
        android:background="#ffffff" >

        <com.facebook.widget.ProfilePictureView
            android:id="@+id/profilePicture"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginBottom="10dp"
            android:gravity="center_horizontal"
            facebook:preset_size="normal" />
    </TableRow>

I want to include profile picture in my program but when I code above lines, it shows the error message: (Error parsing XML: unbound prefix)

How can I get rid of this error.

Anirudh Sharma
  • 7,968
  • 13
  • 40
  • 42
  • possible duplicate of [frequent problem in android view, Error parsing XML: unbound prefix](http://stackoverflow.com/questions/2221221/frequent-problem-in-android-view-error-parsing-xml-unbound-prefix) – Dhinakaran Thennarasu Apr 14 '15 at 03:50
  • check whether you have added `facebook` attribute in root element. Check the above link provided by Dhinakran – Bharatesh Apr 14 '15 at 03:58

2 Answers2

2

If you look at the very top of the xml file, there is usually a line that looks like this:

xmlns:android="http://schemas.android.com/apk/res/android"

This does an XML NameSpace called android, so anything with android:* goes to that file to look for it.

You probably don't have a namespace for facebook declared. So you'll need to do that before moving on.

Jacob Holloway
  • 887
  • 8
  • 24
1

You need to add this line in very first parent tag:

xmlns:facebook="http://schemas.android.com/apk/res-auto"
Harin
  • 2,413
  • 3
  • 15
  • 30