建立Slidemenu - 例如不工作 [英] Set up Slidemenu - example not working

查看:300
本文介绍了建立Slidemenu - 例如不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用SlideMenu库ActionBarSherlock。 <一href="https://github.com/jfeinstein10/SlidingMenu">https://github.com/jfeinstein10/SlidingMenu

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

http://actionbarsherlock.com/

我还没有发出安装actionbarsherlock并运行提供的示例。 但是,不能与例如做相同的OG SlideMenu库:(

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

我可以设置库精(或因此我认为)没有错误(在日食带JRE6)。

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

对于slidemenu例如,我创建的项目,并添加com_actionbarssherlock.jar作为引用libraies。

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

但我有很多:   - R的无法解析误差修改;   - 不能覆盖一些方法误差修改; - 从actionbarsherlock方法都无法识别;比如:该方法getSupportActionBar()是未定义的类型BaseActivity   - 无法从actionbarsherlock误差修改加载风格

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.

这是因为如果该项目不看的类actionbarsherlock。

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

感谢您的帮助。

推荐答案

有关错误

的方法getSupportActionBar()是未定义的类型BaseActivity

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

在SlidingMenu库,编辑类SlidingFragmentActivity延长SherlockFragmentActivity(如下图所示)。那么干净,重建,这种方法现在应该可以找到。

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 {

来源

这篇关于建立Slidemenu - 例如不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆