报错信息:The layout in layout has no declaration in the base layout folder; this can lead to crashes when the resource is queried in a configuration that does not match this qualifier
位置:xml的根布局
我的项目是tv项目,res下有layout(默认布局)、layout_land(横屏)、layout_port(竖屏)
解决方法:把横屏布局layout_land里所有的xml复制一份到layout文件夹下。
如果还是解决不了参考Stack Overflow的这篇:https://stackoverflow.com/questions/52547657/the-layout-layout-in-layout-has-no-declaration-in-the-base-layout-folder-erro
开发了很久,之前一直没问题,现在忽然出现也不知道动了哪里造成的。
博客指出xml根布局报错,提示布局在基础布局文件夹无声明,可能导致资源查询时崩溃。项目为tv项目,有默认、横屏、竖屏布局。解决方法是将横屏布局里的xml复制到默认布局文件夹,若仍未解决可参考Stack Overflow文章。

1254





