Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Examples don't work #145

Closed
akex31 opened this Issue · 20 comments
@akex31

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 !

@jfeinstein10

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 :)

@jtehlert

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

@SergioCarabantes

Same problem!. I can't compile the example

@jfeinstein10
Owner

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

@akex31

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

Thanks.

@vanezkw

I also have the same problem.

@aangouti

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

@vishwasdoth

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

@waiwu9292

Hello,

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

@jd-alexander

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

@michaelye

I have the same problem,and I fixed it by making com.slidingmenu.lib.app.SlidingFragmentActivity.java 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.

@lx3h

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

@pamio

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.

@lx3h
@payraj143

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.

@pamio

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 :)

@frodberserk

awesome work :+1 :)

@frodberserk

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. :)

@yangwuweiyouwei

up is the solved method...

@srnaik

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.