Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Examples don't work #145

akex31 opened this Issue · 20 comments

Hi, I would like to use your library for my project as it seems great and meet my need.

I can't compile the examples provided because i have the following errors :

  • getSupportActionBar() is undefined
  • a few methods like onOptionsItemSelected() can't be override.

My ABS is working fine (and i version 4.2.0) and i had no trouble to set up the slidemenu library.

For ABS, slidemenu and the examples, i set a minsdk to 7 and target 17.
I use JRE6.

Thanks for helping !


Go into slidingFragmentActivity and make it extend SherlockFragmentActivity. That should be the only thing you needed. Other than that you can always download the example from the Play Store :)


Having the exact same problem. Changed the activity to SherlockFragmentActivity, but that just causes problems with these being "undefined for BaseActivity":
SlidingMenu sm = getSlidingMenu();


Same problem!. I can't compile the example


So to reiterate, your version of SlidingFragmentActivity extends SherlockFragmentActivity, correct?


The solution "Go into slidingFragmentActivity and make it extend SherlockFragmentActivity" has worked for me !
And so for the library is working great for me.



I also have the same problem.


Thanks guys. It solved my problem. Just don't forget to import; or just simple hit Cmd+Shift+O :).


Can I user Sliding Menu with my custom ActionBar layout? I am using ABS.



How can I just take your content only sliding menu bar?


I am having the same error as defined by jtehlert. I extended the slidingFragmentActivity to SherlockFragmentActivity, the error is still present.


I have the same problem,and I fixed it by making extends SherlockFragmentActivity,then you will get the error tip: "SherlockFragmentActivity cannot be resolved to a type".So just add the ActionBarSherlock's library for the slide_menu_library,then import correct package.Next add the slide_menu_library for the demo or your project.At last,clean the projects.


Nothing is working for me after changing to "SherlockFragmentActivity".


I'm facing the same problem. I've tried above mentioned solutions but nothing worked out for me. I still have the problem and have found no solution yet.


I'm facing the same problem.but i didnt got any solution.
error : he method getSupportActionBar() is undefined for the type BaseActivity
Please help me i am new to this libraries.i always use my custom tabs.


I resolved the issue. @payraj143 .. Did you include the library properly, also did u do clean after that. My problem was that I did not extend it from SherlockFragmentActivity. You could follow the video mentioned in @lx3h's reply. That should do :)


awesome work :+1 :)


Import the actionbarsherlock library to sliding menu library. Then in SlidingFragmentActivity, extend it from Fragment activity to SherlockFragmentActivity. Clean it. Then in your project, import only Sliding Menu library. No need to import ActionbarSherlock library again. Also, make sure that you have same v4 support library in both acrtionbarsherlock and sliding menu libraries. :)


up is the solved method...


Whatever frodberserk has mentioned is absolutely correct :-). Thank you :+1:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.