views:

39

answers:

2

I got an error error: Error parsing XML: unbound prefix when i did not add an attribute xmlns:android="http://schemas.android.com/apk/res/android" for my Layout. Why we want to set this attribute for a layout?Any Specific Reasons? what i put the url mentioned as a value for xmlns:android. I got the server not found Exception. Please Share your knowledge about this?

+1  A: 

This is not really an attribute for your layout but the namespace for the XML. Adding this xmlns:android would allow you to use all the "android:..." attributes and others.

WRT the 'server not found' exception, can you post the XML file ?

Matthieu
+1  A: 

Matthieu explained why you need that attribute.

The reason you're getting a server not found error, is because XML namespace URLs aren't required to actually exist, and in this case they clearly don't.

benvd
Oooh... you mean you were trying to go to that URL with a web browser... sorry, I did not think about that, that makes sense why you would have that error...
Matthieu