No resource identifier found for attribute 'layout_behavior' in package

后端 未结 11 985
不知归路
不知归路 2020-11-30 05:43

My application worked fine until I tried to add a library to it. After I added the library, Android Studio gives me the following error:

Error:(26) No

11条回答
  •  死守一世寂寞
    2020-11-30 06:11

    if you not added android material yet first add this line in your dependencies in build.gradle file

    implementation 'com.google.android.material:material:1.0.0'
    

    then use this attribute instead

    app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
    

提交回复
热议问题