建立Slidemenu - 例如不工作工作、Slidemenu

2023-09-12 10:48:52 作者:誓言丶抵不过时间摧残

我试图用SlideMenu库ActionBarSherlock。 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 {

来源