What is the story with the Android namespace for Android?

When you first use a name from the android XML namespace, you should tell where to find it, with an attribute in XML as follows:

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

However, this URL - 404 - did not find anything there.

Android: the namespace is actually included in the locally installed SDK.

So what is going on here? Why do I need to include a dead URL? Why does the build system not take it from the SDK, like all other libraries?

Thanks, just looking for the background to this.

Peter

+4
source share
1 answer

This is one of the bad design decisions in XML, the reason for using URIs is that it would be easy to guarantee that they are unique. This is a design flaw; users expect them to point somewhere to find something. They are not in this case.

The fact that they can be used to search for resources is random. When you understand that these are just unique lines, the inclusion of definition files in another SDK becomes completely natural.

+12
source

Source: https://habr.com/ru/post/1313042/


All Articles