8

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

but the following error was found.

No resource identifier found for attribute 'layoutManager' in package 'android.support.design'

enter image description here

What I have done so far..

  1. Update to latest support library version
  2. Add appcompat as its dependency (of "design library")
  3. Check "design library" as a Library Module

Please help.

Jongz Puangput
  • 5,527
  • 10
  • 58
  • 96

2 Answers2

24

The design library depends on appcompat-v7 library as pointed out in xcesco`s answer. But (at least in rev. 23.1) it depends on v7-recyclerview library as well.

So basically you have two options:

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

Thanks for making this clear in the docs Google!

Community
  • 1
  • 1
Štarke
  • 627
  • 6
  • 10
3

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

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

And you are good to go....

Chordin4tion
  • 984
  • 6
  • 15