Issue
I have two layouts, for one I create more layouts for different screen sizes. But when I do the same for the latter I get this error. For example, there is a "Large" for mainlayout but not for the second layout, still, I am taking this error.
OK is disabled.
Solution
Android Studio displays your project files in the Android
view. This view does not reflect the actual file hierarchy on disk. To see the actual file structure of the project including all files hidden from the Android view, select Project
from the dropdown at the top of the Project window.
When ever you changed then you see layout-large
already exists in your res
folder.
For custom layout folder, Go into your modules gradle.build
file and create a sourceSets definition like below
sourceSets {
main {
res.srcDirs = ['src/main/res',
'src/main/res/layouts/custom_layout_folder_name'
]
}
}
Answered By - IntelliJ Amiya