The <resources line in the ids.xml


#1

I’ve gone back through the book to find why we need the namespace in the ids.xml file. I found on pg 12 where it says that LinearLayout, as the root element, must specify the Android XML namespace at schemas.android.com/apk/res/android . However, when I created the ids.xml file it didn’t automatically put in the namespace and the book doesn’t have it in bold to be added.

The reason for my post is because I don’t want to leave it out if there is some practical “best practice” reason for always putting in the namespace (for the future when I’m using the examples from the book to guide my own app development.)

After searching online, there doesn’t seem to be a succinct coherent explanation that would apply in the situation in chapter 11. Therefore, can you explain if it is needed in the ids.xml file and why or why not?


#2

It is not required.

Added an item to the errata. Thanks!