Praveen
Praveen

Reputation: 91205

Layout in Android?

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?

Upvotes: 0

Views: 145

Answers (2)

benvd
benvd

Reputation: 5784

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.

Upvotes: 1

Matthieu
Matthieu

Reputation: 16417

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 ?

Upvotes: 1

Related Questions