Lakshmansundeep
Lakshmansundeep

Reputation: 53

How to fix parsing XML: unbound prefix in android

I am getting an XML:Unbound prefix error in android i tried a lot but it was still occurring please make it solve as soon as possible..........................................................................................................................................................................................................................................................................................................

<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">



    <Button
        android:id="@+id/button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Click" />

    <pl.pawelkleczkowski.customgauge.CustomGauge
        android:id="@+id/gauge3"
        android:layout_width="200dp"
        android:layout_height="200dp"
        android:layout_centerHorizontal="true"
        android:layout_centerVertical="true"
        android:paddingBottom="10dp"
        android:paddingLeft="10dp"
        android:paddingRight="10dp"
        android:paddingTop="10dp"
        app:endValue="100"
        app:pointEndColor="@color/Green"
        app:pointStartColor="@color/Red"
        app:startAngel="180"
        app:startValue="0"
        app:strokeCap="BUTT"
        app:strokeColor="@color/Gray"
        app:strokeWidth="20dp"
        app:sweepAngel="180" />

    <TextView
        android:id="@+id/textView2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignBottom="@+id/gauge3"
        android:layout_centerHorizontal="true"
        android:layout_marginBottom="52dp"
        android:text="0"
        android:textSize="30dp"
        android:textStyle="bold" />

</RelativeLayout>

Upvotes: 0

Views: 405

Answers (2)

George Thomas
George Thomas

Reputation: 4586

Change

<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">

to

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:gauge="http://schemas.android.com/apk/res-auto"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

Upvotes: 2

mmlooloo
mmlooloo

Reputation: 18977

Change

<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">

to

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

Upvotes: 0

Related Questions