1

我是第一次使用 Actionbar Sherlock。我想要创建的是一个带有溢出按钮的操作栏。我尝试导入http://wptrafficanalyzer.in/blog/adding-menus-to-action-bar-in-pre-honeycomb-versions-using-sherlock-library/项目并 emulate 。

但我收到以下错误没有找到与给定名称匹配的资源(在“主题”处,值为“@android:style/Theme.Sherlock.ForceOverflow”)。

我已经包含了来自 www.actionbarsherlock.com 的动作栏 Sherlock 的库文件

有人可以帮忙吗?

4

2 回答 2

3

最新版本 (4.2) 中已删除强制溢出。查看 Github 上的问题以讨论其背后的动机。

于 2012-10-15T09:22:20.343 回答
0

Follow the steps below and i am 100% sure that you will be successful in importing the android Action Bar Sherlock library.

  1. The first thing you have to do, is to download the library from http://actionbarsherlock.com? . After this unzip/untar it.

  2. The folder that you get will contain a number of sub-folders and files. Your action bar sherlock library is in the folder “actionbarsherlock”. Now, rename the folder “actionbarsherlock” to “ActionBarSherlockLib”.

  3. Now go to Eclipse and add the ABS(Action Bar Sherlock )-library as an Android project. Do not use Eclipse’s import tool to import the ActionBarSherlock library – it would not work immediately and you would have to fix some settings. Instead, create a new project as explained in the next step.

  4. Open File -> New -> Project -> Android Project From Existing Code. Select this and click next.

  5. In the next screen eclipse will ask you to browse the root directory. You have to select the root folder which contains all the files and folders that you had initially unzipped. After selecting the correct root folder, eclipse suggests a list of projects to create.

  6. You have to only check “ActionBarSherlockLib” and uncheck the rest.

  7. Check 'copy projects into workspace' and click finish.

  8. You are now a champion and have successfully imported the action bar sherlock library into eclipse. Congrats.

于 2014-10-31T10:26:31.993 回答