views:

52

answers:

1

When you first use a name from the android XML namespace, you have to say where to find it, with an attribute in XML like this:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

However, that URL is a 404 - nothing found there.

The android: namespace is actually included under the locally-installed SDK.

So what's going on here? Why do I need to include a dead URL? Why doesn't the build system pick it up from the SDK like all the other libraries?

Thanks, just looking for the back story on this.

Peter

+7  A: 

This is one of the bad design decisions in XML, the reason for using URIs was that it would be easy to guarantee that they were unique. This is the design flaw, users expect for them to point somewhere to locate something. They don't in this case.

The fact that they can be used for locating resources is kind of incidental. When you realize that they are just unique strings then including the definition files in a different SDK becomes totally natural.

Ukko