No resource identifier found for attribute 'layout_behavior' in package

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 resource identifier found for attribute
‘layout_behavior’ in package ‘inf..’

  • Theme dependent colors of selected widgets
  • failed to resolve github repo
  • Custom circular views
  • Find the key hash for a signed app
  • How can I show current location on a Google Map on Android Marshmallow?
  • how to zoom the image to specified coordinates in android
  • This is my build.gradle file:

    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        compile ''
        compile ''
        compile 'com.ogaclejapan.smarttablayout:utils-v4:1.3.0@aar'
        compile 'com.ogaclejapan.smarttablayout:library:1.3.0@aar'
        compile 'com.jpardogo.materialtabstrip:library:1.1.0'
        // compile 'com.lorentzos.swipecards:library:1.0.9@aar'
        compile ''
        compile ''
        compile 'com.melnykov:floatingactionbutton:1.3.0'
        compile project(':swipelib')

    This is the xml which causes the error:


    I tried the following:

    • Removed the library
    • Reset Android Studio and my computer
    • Reverted to previous version of my code from git.

    However, the error persists. How do I resolve this?

  • Failed to install HelloAndroid.apk on device 'emulator-5554!
  • Cordova and setting Android using command line
  • Change package name for Android in React Native
  • Android Studio: Integrating Butterknife?
  • Concate JSONArray
  • How to pass Bundle from Fragment to Fragment
  • 6 Solutions collect form web for “No resource identifier found for attribute 'layout_behavior' in package”

    That string comes from this library:

    compile ''

    Since you’re not using the CoordinatorLayout from the Material Design Support library, you should be able to safely remove the app:layout_behavior attribute. It was probably cut & paste from other code.

    NOTE: If you are actually using CoordinatorLayout and want the cooperative scrolling behaviors to work, you need to add the dependency for the latest version of the Material Design Support library to your Gradle build file (as shown above).

    Just in case someone else comes from Google and makes the same mistake I did, it’s layout_behaviOr, not layout_behavioUr.

    Note: The versions have changed by now, so replace below versions with the most recent ones.

    The accepted answer gets rid of the error in case layout_behavior is not needed, however if you actually want to use:


    Make sure to add the proper dependency to the build.gradle file of your module:

    apply plugin: ''
    android {
        compileSdkVersion 23
        buildToolsVersion "21.1.2"
       //Other stuff....
    dependencies {
        //Importing the design library fixes the build
        compile ''
        //Other libraries....

    I.e. add this line to your dependencies:

    compile ''

    I have this problem. and i resolved my problem with tow steps.
    1- Download last version of AndroidSupportLibrary package and AndroidSupportRepository package(or upgarad them to the newest version) in SDKTools of android sdk manager .
    2- Change support depenedencies ind build.gradle fiel to

    compile ''
    compile ''
    compile ''
    compile ''

    Add compile
    into your build.gradle dependencies.

    compile ‘’

    this solution for me

    Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.