Error: The layout "basic" in layout-land has no declaration in the base layout folder — but I really don't need it

Issue

My application has layout-land/basic.xml and layout-port/basic.xml files. Why do I need one in layout/?

Is there something I can do to make Android Studio not complain here?

Solution

Resources are an override system. You generally wouldn’t put one in layout-land and one in layout-port. Generally you put one or the other in the base directory, then do one of the two layout-orientation folders as an override.

Answered By – Gabe Sechan

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published