1

I am writing an application that consists of the Library downloaded from here and i am getting an error called "Error parsing XML:Unbound prefix" how to fix this error and this is my XML please make it solve

    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
         xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent" >
          <com.gc.materialdesign.views.ScrollView
            android:layout_width="fill_parent"
            android:layout_height="fill_parent">


        <com.gc.materialdesign.views.ButtonRectangle
                    android:id="@+id/button"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_centerInParent="true"
                    android:background="#1E88E5"
                    android:text="Button" />
    <RelativeLayout
                android:layout_width="fill_parent"
                android:layout_height="32dp"
                android:layout_marginLeft="24dp" >

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_centerVertical="true"
                    android:text="Float Button" />

                <View
                    android:layout_width="fill_parent"
                    android:layout_height="1dp"
                    android:layout_alignParentBottom="true"
                    android:background="#1E88E5" />



    </RelativeLayout>
        </com.gc.materialdesign.views.ScrollView>
  <!-- Error Occurred Here -->         <com.gc.materialdesign.views.ButtonFloat
                    android:id="@+id/buttonFloat"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignParentRight="true"
                    android:layout_alignParentBottom="true"
                    android:layout_marginRight="24dp"
                    android:background="#1E88E5"
                    materialdesign:animate="true"
                    materialdesign:iconDrawable="@drawable/pencil" />


    </RelativeLayout>
lakshman
  • 181
  • 8
  • 20

2 Answers2

2

I think you should replace

  <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
        xmlns:tools="http://schemas.android.com/tools">

with

  <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:materialdesign="http://schemas.android.com/apk/res-auto"
        xmlns:tools="http://schemas.android.com/tools">

Source: the demo project included in the link you provided in your question

iRuth
  • 2,737
  • 3
  • 27
  • 32
  • Thanks dude it works fine by placing xmlns:materialdesign="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" @iRuth – lakshman Jan 31 '15 at 06:45
1

Add this line in you parent Relative Layout

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

Biswajit Karmakar
  • 9,799
  • 4
  • 39
  • 41