Resource ID not found for attribute 'layoutManager' in package 'android.support.design'

I added android.support.design library as a dependency in my project

but the following error was detected.

Resource ID not found for layoutManager attribute in package 'Android.support.design'

enter image description here

What I have done so far.

  • Update to the latest support library
  • Add appcompat as its dependency ("design library")
  • Check the design library as a library module

Please, help.

+7
android android-support-library
source share
2 answers

The design library depends on the appcompat-v7 library, as indicated in xcesco's answer . But (at least in version 23.1) it depends on the v7-recyclerview library.

So, you have two options:

  • Link library v7-recyclerview to design support library project (same as you link appcompat-v7 library)
  • Or you can get rid of the dependency by deleting the line app:layoutManager="android.support.v7.widget.LinearLayoutManager" in ..design\res\layout\design_navigation_menu.xml . (If you are not using NavigationMenu from the design library or are hoping to fix this problem later)

Thank you for your clarification in Google docs!

+24
source share

To use android.support.design, add this as a gradle dependency:

 compile 'com.android.support:design:22.2.1' 

And you are good to go ....

+3
source share

All Articles