Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
229 views
in Technique[技术] by (71.8m points)

android - Set up Slidemenu - example not working

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

http://actionbarsherlock.com/

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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 {

Source


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

56.9k users

...