Question

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?

Was it helpful?

Solution

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 ?

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top