• 3

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191


File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

Set up Slidemenu - example not working

I'm trying to use the SlideMenu library with ActionBarSherlock. https://github.com/jfeinstein10/SlidingMenu


I had not issue installing actionbarsherlock and run the examples provided. But, can't do the same with the example og the SlideMenu library :(

I can set up the library fine (or so i think) without errors (under eclipse with jre6).

For the slidemenu example, i created the project, and added com_actionbarssherlock.jar as a "referenced libraies".

But i have lots of : - R cannot resolve erros ; - can't overrides some methods erros; - methods from actionbarsherlock are not recognized ; ex : "The method getSupportActionBar() is undefined for the type BaseActivity" - can't load style from actionbarsherlock erros.

It is as if the project doesn't see the classes from actionbarsherlock.

Thanks for any help.

enter image description here

For the error

"The method getSupportActionBar() is undefined for the type BaseActivity"

Inside the SlidingMenu library, edit the class SlidingFragmentActivity to extend SherlockFragmentActivity (like below). Then clean and rebuild, this method should now be found.

public class SlidingFragmentActivity extends SherlockFragmentActivity implements SlidingActivityBase {


  • 135
Reply Report
    • Thank you very much !!! after long frustrating search finally i can run example !! now next i have to look for "how to implement it in my own project" please help me if you can ! Thanks again. +1 for you
    • Many thanks for this. I did the above and then added ActionBarSherlock as a library to the SlidingMenu library project. Surely there must be a reason why this builds okay on the developers' system - I'd be very keen to understand why.

Look add Problems tab to see there are any error ? Right click your project and check your all Libraries. If everthing ok, try to clean your project.

  • 0
Reply Report
      • 2
    • Ok, i did check my libraries. I did import the jar files of the both libraries. I switch to put them in the "add library" in the android tab of the build path menu. I still have two errors : - getSupportActionBar() method is undefined. This method is supposed to be in actionbarsherlock. I don't understand why eclipse doesn't see it. - onOptionsItemSelected() can't be override. Same thing, eclipse doesn't see that it is part of actionbarsherlock. My example activity extends slidemneuactivty wich extends sherlockactivity, so it should work. I did try to clean my project. Any ideas ?