For people who are still facing this issue, the default Build Action of the layout file would be set to TransformFile
. Select the layout, go to the Layout Properties, and in the properties pane, Select AndroidResource
as your Build Action. Clean build your project and it should work.