0

Hi I am getting this error in the ActionBarDrawerToggle cannot be resolved when I import this in my activity android.support.v7.app.ActionBarDrawerToggle;
I have already imported appcompact_v7 and android-support-v7-appcompact libaries.

It gives no error when I import import android.support.v4.widget.DrawerLayout; import android.support.v7.app.ActionBarActivity;

I need ActionBarDrawerToggle for implementing the Action Bar.
I have tried everything.

P.S: I am using Eclipse

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115

2 Answers2

0

Make sure you compile the v7 support library with your project.
Here's an example build.gradle for AndroidStudio:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.1.1'
}
Simas
  • 43,548
  • 10
  • 88
  • 116
0

For Eclipse, you need import android-sdk\extras\android\support\v7\appcompat to your project as a library. Refer to this doc Support Library Setup

Xcihnegn
  • 11,579
  • 10
  • 33
  • 33