Configurations for foo.xml must agree on the root element's ID

34 Views Asked by At

My problem is exactly the same as the one described here: Android: Configurations .xml must agree on the root element's ID

and I understand the solution to the question. However, what I can't understand is why the same layout files work without errors in another project I copied them from (namely, the source project is Android Navigation codelab downloaded from Learn Jetpack Navigation official codelab).

The issue is this: the layout file navigation_activity.xml has a base file and 2 configuration versions for Screen Width and Screen Height qualifiers. The root element for the base file is a DrawerLayout with id "@+id/drawer_layout" whilst the configuration versions have a LinearLayout and a RelativeLayout root elements, respectively, without id. Both projects use the same SDK 34, same build tool Kotlin DSL, same versions.

0

There are 0 best solutions below