Reputation: 595
I am new to android and i tried a lot to solve this error but was unsuccessful please help me to solve this
My Imports
import tabswipe.TabsPagerAdapter;
import android.app.ActionBar;
import android.app.ActionBar.Tab;
import android.app.FragmentTransaction;
import android.content.res.Configuration;
import android.content.res.TypedArray;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.support.v4.view.ViewPager;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.support.v4.app.ActionBarDrawerToggle;
import android.support.v4.widget.DrawerLayout;
import android.support.v4.view.GravityCompat;
import com.actionbarsherlock.app.SherlockFragmentActivity;
import com.actionbarsherlock.view.MenuItem;
Even After importing these. I am getting the following error-
DrawerLayout cannot be resolved to a type
ActionBarDrawerToggle cannot be resolved to a type
Please help me.
Upvotes: 1
Views: 8282
Reputation: 1684
Import the support lib to your projects..
For more information Click Here...
Upvotes: 0
Reputation: 10009
Import the support library in your project as the following link describe
Upvotes: 0
Reputation: 8932
Try to prefix that your Drawer layout with the corresponding lib, because there is may be a conflict when you import your lib (I had this pb when I tryed to implement FragmentManager)
android.support.v4.widget.DrawerLayout myDrawer = ...
Upvotes: 1
Reputation: 1065
Try to change the support-v4.jar
in your libs
and clean
the project. It should work.
Upvotes: 0
Reputation: 2595
Try adding the latest support library to your project.
Right click your project > go to android tools > add support library
Clean your project afterwards.
Upvotes: 3