Cannot find the declaration of element 'LinearLayout'

mac2025-10-11  11

在layout文件夹下建立子文件后(),子文件夹里xml文件出现Layout:cannot find the declaration of element 'LinearLayout'

需要在build.gradle里增加sourceSets节点将添加布局引用

格式  src/main/res/layout/文件夹名称/layout/

示例:

'src/main/res/layout/law_enforce_layout'

最新回复(0)