No resource identifier found for attribute 'layout_behavior' in package

后端 未结 11 995
不知归路
不知归路 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 05:52

    For those who use AndroidX and don't want to add the old library:

    com.android.support:design:28.0.0
    

    you can add instead:

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

    and use it like this:

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

提交回复
热议问题