-2

on my first debugging app i have error on 'xmlns', that i don't find solution.

Error:"Type Unexpected namespace prefix "xmlns" found for tag AutoCompleteTextView"

<?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
            android:layout_width="fill_parent"  
            android:layout_height="fill_parent" 
            android:gravity="center" 
            android:orientation="horizontal"
            android:background="#FFFFFFFF" 
            android:padding="10dip">

        <!-- World URL-->
        <AutoCompleteTextView android:layout_weight="1"  xmlns:android="http://schemas.android.com/apk/res/android" 
                              android:id="@+id/url" 
                              android:layout_width="fill_parent" 
                              android:text="@string/urllauncher_default_value_textfield" 
                              android:textColor="#000000"   
                              android:layout_height="wrap_content" 
                              android:singleLine="true" 
                              android:hint="@string/urllauncher_hint_textfield" 
                              android:inputType="textUri"/>

        <!-- Launch button -->
        <Button android:layout_weight="0" 
                android:id="@+id/button_visit_url"  
                android:layout_width="wrap_content" 
                android:layout_height="wrap_content" 
                android:text="@string/urllauncher_button_launch">
        </Button>

 </LinearLayout>
pgampe
  • 4,531
  • 1
  • 20
  • 31

1 Answers1

0

Remove the xmlns:android="http://schemas.android.com/apk/res/android"from the following section:

                  <AutoCompleteTextView android:layout_weight="1"  xmlns:android="http://schemas.android.com/apk/res/android" 
                              android:id="@+id/url" 
                              android:layout_width="fill_parent" 
                              android:text="@string/urllauncher_default_value_textfield" 
                              android:textColor="#000000"   
                              android:layout_height="wrap_content" 
                              android:singleLine="true" 
                              android:hint="@string/urllauncher_hint_textfield" 
                              android:inputType="textUri"/>

Because the namespace has already been defined in your LinearLayout

Mohammad Arman
  • 7,020
  • 2
  • 36
  • 50