简体   繁体   English

找不到资源标识符

[英]No resource identifier found

I am trying to create an app with a collapsible toolbar but getting an error "No resource identifier found for attribute 'layout_collapseMode' in package android" 我正在尝试使用可折叠的工具栏创建一个应用程序,但收到错误消息“在包android中找不到属性'layout_collapseMode'的资源标识符”

i have tried adding different libraries in gradle but error still persists 我曾尝试在gradle中添加其他库,但错误仍然存​​在

this is the errors and the highlighted xml code for the error 这是错误以及该错误的突出显示的xml代码

Change the prefix to app :layout_collapseMode="parallax" from android :layout_collapseMode="parallax" on line 36. 从第36行的android :layout_collapseMode =“ parallax”将前缀更改为app :layout_collapseMode =“ parallax”

Also, this line should belong in the RelativeLayout(parent of the ImageView), which is a direct child of the CollapsingToolbarLayout if you intend to achieve parallax collapsing of the layout. 另外,此行应属于RelativeLayout(ImageView的父级),如果要实现布局的视差折叠,则该行应为CollapsingToolbarLayout的直接子级。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM