Android: Import DrawerLayout cannot be resolved

I’m trying to import the classes required to use the new “Navigation Drawer” from Android


  • Is there code for Snackbars in Android L or are we expected to implement them ourselves?
  • Creating tabs using Fragments now that TabActivity is deprecated
  • Multi flavor app based on multi flavor library in Android Gradle
  • Select target API in the Android Studio layout design preview
  • How to Overlap items in LinearLayoutManager - RecyclerView (like stacking cards)
  • App crashes after first Facebook Login
  • ActionBarDrawerToggle:

    The import cannot be resolved
    The import cannot be resolved

    I have updated the libraries to the latest version but still these classes are not recognized.

    Related posts:

    Android Intent Chooser to only show E-mail option
    Why should a TypedArray be recycled?
    Android - How to retrieve list of registered geofences
    Eclipse Android Graphical Layout Editor Broken
    Mockito AbstractMethodError on initMocks
    Android Clickable On screen text
  • How to change home as up resource programmatically?
  • Android DeadSystemException
  • Is it mandatory to use Gradle with Android Studio?
  • How to enable/disable toolbar scrolling programmatically when using design support library
  • What are the Android SDK build-tools, platform-tools and tools? And which version should be used?
  • What is ParcelFileDescriptor in android
  • 3 Solutions collect form web for “Android: Import DrawerLayout cannot be resolved”

    How do I update the JARs in libs?

    I usually do it by copying the file. You will find the JARs inside $ANDROID_SDK/extras/android/support, where $ANDROID_SDK is wherever your Android SDK is installed.

    If you use Eclipse, if you copy this at the filesystem level, and Eclipse is open, press <F5> with the project highlighted in Package Manager so Eclipse picks up the changes. Easier is to drag it out of the SDK and drop the JAR into libs/ right in Eclipse, which will both update the filesystem and let Eclipse know about the change.

    It’s possible that the Eclipse option to add the JARs (right-click over the project, then choose Android Tools > Add Support Library… from the context menu) will also do this. That particular approach doesn’t work for me due to some peculiarities with my development environment.

    Copy the support jar from the Android SDK into your libs folder. Should be in <ANDROID SDK FOLDER>\extras\android\compatibility\v13.

    In android studio, I found that adding dependencies solved the problem.

    In the file menu find project structure.
    Under ‘app’, look for the dependencies tab.
    Click the green plus at the right hand side.
    Select library dependency.

    I added both support-v4 and support-v13.

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