After migrating to Android Studio 3.2, API 28, I am getting the following error on my app\'s layout:
The layout in layout has no declaration in the base lay
I had copied the xml files in the folder using Windows Explorer. It seems to have caused an encoding issue. After deleting the files and coping them inside Android Studio, the problem was resolved.
I just did Build > Clean Project
Note that when you are using different versions of layout like (Large/Small/Nornal) then that case you have to same main layout folder. like this way
I received this error when moving layout files between Gradle modules. I didn't have to go so far as to invalidate caches as it resolved itself when I restarted Android Studio
and cleaned the project. It seems likely to be an IDE bug.
This issue seems to be happening because studio or compiler is not able to find the resource file inside the base layout folder. To solve the problem you might need to create the file into different layout folders. If you are using layout folders v21, v25 etc. folders for designing layouts for different target devices then you also might need to place your resource files there too.
In my case this warning appeared due to "wrong" character (dot) used in value name:
<dimen name="dp.divider.xlarge">24dp</dimen>
Removing dots (right click on a name, then Refactor-Rename in Android Studio) resolved the problem.