Build Failed: No resource identifier found for attribute 'layout_behavior'

Issue

I’m using Android Studio 2.3.3enter image description here

I did all the steps below but nothing worked.

1) Sync Project with gradle files
2) Build -> Clean Project
3) Build -> Rebuild Project
4) File -> Invalidate caches

Solution

Looks like a legacy project trying to configure a material component, would you mind trying these?, though I’m not quite sure if they would help or the version would be compatible, but afaik the layout_behavior is part of the design framework.

If its not androidx, try this

implementation 'com.android.support:design:28.0.0'// latest

if its androidx, try this then

implementation 'com.google.android.material:material:1.8.0-alpha02' //latest

These are the latest versions from maven artifacts com.android.support:design
and com.google.android.material:material

Answered By – z.g.y

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published