当前位置: 首页 > 面试题库 >

导入后,ActionBarSherlock库充满了错误

轩辕亮
2023-03-14
问题内容

好的,我正在尝试使ActionBarSherlock正常工作,因此我通过以下方式导入了库:

Creating New Project > Create Project From Existing Source > Choosing library from the ActionBarSherlock folder

之后,我使用相同的方法从示例文件夹中导入了一个示例项目,该库和示例均设置为Android 15 Build Path!

我的问题是,库中出现了100多个错误,有关Call的各种内容都需要api级别11,而且我不知道怎么了!

我尝试过的事情:
清理项目
将构建路径设置为13、14和15

大多数错误说:

Call requires API level 11 (current min is 8): android.app.something

更新:我尝试右键单击lib文件,然后单击添加以构建路径,但没有用,这些是我遇到的一些错误:

Description Resource    Path    Location    Type
The method add(CharSequence) of type MenuWrapper must override a superclass method  MenuWrapper.java    /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 33 Java Problem
The method add(int, int, int, CharSequence) of type MenuWrapper must override a superclass method   MenuWrapper.java    /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 43 Java Problem
The method add(int, int, int, int) of type MenuWrapper must override a superclass method    MenuWrapper.java    /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 48 Java Problem
The method add(int) of type MenuWrapper must override a superclass method   MenuWrapper.java    /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 38 Java Problem
The method addIntentOptions(int, int, int, ComponentName, Intent[], Intent, int, MenuItem[]) of type MenuWrapper must override a superclass method  MenuWrapper.java    /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 81 Java Problem
The method addOnAttachStateChangeListener(View_OnAttachStateChangeListener) of type ActionMenuItemView must override a superclass method    ActionMenuItemView.java /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 84 Java Problem
The method addOnAttachStateChangeListener(View_OnAttachStateChangeListener) of type ActionMenuPresenter.OverflowMenuButton must override a superclass method    ActionMenuPresenter.java    /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 627    Java Problem
The method addSubMenu(CharSequence) of type MenuWrapper must override a superclass method   MenuWrapper.java    /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 61 Java Problem
The method addSubMenu(int, int, int, CharSequence) of type MenuWrapper must override a superclass method    MenuWrapper.java    /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 71 Java Problem
The method addSubMenu(int, int, int, int) of type MenuWrapper must override a superclass method MenuWrapper.java    /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 76 Java Problem
The method addSubMenu(int) of type MenuWrapper must override a superclass method    MenuWrapper.java    /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 66 Java Problem
The method clear() of type MenuWrapper must override a superclass method    MenuWrapper.java    /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 101    Java Problem
The method clearHeader() of type SubMenuWrapper must override a superclass method   SubMenuWrapper.java /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 49 Java Problem
The method close() of type MenuWrapper must override a superclass method    MenuWrapper.java    /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 157    Java Problem
The method collapseActionView() of type ActionMenuItem must override a superclass method    ActionMenuItem.java /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 264    Java Problem
The method collapseActionView() of type MenuItemImpl must override a superclass method  MenuItemImpl.java   /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 612    Java Problem
The method collapseActionView() of type MenuItemWrapper must override a superclass method   MenuItemWrapper.java    /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 254    Java Problem
The method collapseItemActionView(MenuBuilder, MenuItemImpl) of type ActionBarView.ExpandedActionViewMenuPresenter must override a superclass method    ActionBarView.java  /com_actionbarsherlock/src/com/actionbarsherlock/internal/widget    line 1497   Java Problem
The method describeContents() of type ActionMenuPresenter.SavedState must override a superclass method  ActionMenuPresenter.java    /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 557    Java Problem
The method expandActionView() of type ActionMenuItem must override a superclass method  ActionMenuItem.java /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 259    Java Problem
The method expandActionView() of type MenuItemImpl must override a superclass method    MenuItemImpl.java   /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 598    Java Problem
The method expandActionView() of type MenuItemWrapper must override a superclass method MenuItemWrapper.java    /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 249    Java Problem
The method expandItemActionView(MenuBuilder, MenuItemImpl) of type ActionBarView.ExpandedActionViewMenuPresenter must override a superclass method  ActionBarView.java  /com_actionbarsherlock/src/com/actionbarsherlock/internal/widget    line 1471   Java Problem
The method findItem(int) of type MenuWrapper must override a superclass method  MenuWrapper.java    /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 127    Java Problem
The method flagActionItems() of type ActionBarView.ExpandedActionViewMenuPresenter must override a superclass method    ActionBarView.java  /com_actionbarsherlock/src/com/actionbarsherlock/internal/widget    line 1466   Java Problem
The method flagActionItems() of type MenuPopupHelper must override a superclass method  MenuPopupHelper.java    /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 280    Java Problem
The method getActionProvider() of type ActionMenuItem must override a superclass method ActionMenuItem.java /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 243    Java Problem
The method getActionProvider() of type MenuItemWrapper must override a superclass method    MenuItemWrapper.java    /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 240    Java Problem
The method getActionView() of type MenuItemWrapper must override a superclass method    MenuItemWrapper.java    /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 229    Java Problem
The method getAlphabeticShortcut() of type MenuItemWrapper must override a superclass method    MenuItemWrapper.java    /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 123    Java Problem

问题答案:
  • 转到项目属性> Java编译器。使用JDK 1.6。
  • 确保使用Android 4.0+同时编译库和应用程序
  • 确保您的targetSdkVersion为14或更高。


 类似资料:
  • 问题内容: 借助Halfdans的建议,在首先安装git之后,我能够成功使用goinstallgithub.com/hoisie/web.go而没有任何错误。但是,现在当我尝试编译给出的示例代码时,go找不到了Web包。我得到了错误 关于此代码 为了识别包装,我需要做些特别的事情吗?我在$ GOROOT / src / pkg / github.com / hoisie / web.go / we

  • 我将tensorflow与Python2.7结合使用。但是,在将Python2.7.10更新为2.7.13之后,我在tensorflow中遇到了一个导入错误 输出从 来自哪个python的输出: 我相信这个路径在python更新后改变了,但不确定。一个解决方案可能是降级python,但这似乎是一个糟糕的解决方案?当我在一个团队工作时,我想避免重新安装Tensorflow,因为最终会有不同的版本,但

  • ActionBarSherlock 是Android compatibility library 的一个扩展, 不知道什么原因 Android 兼容开发包没有包含ActionBar. 所以就有了ActionBarSherlock . 其使用方式和 兼容开发包类似. ActionBarSherlock 被设计成通过一个API就能够很方便使用所有版本的Android操作栏的设计模式。

  • 我正试着用这本手册开始tensorflowhttps://www.tensorflow.org/install/install_windows 所有安装都成功完成,我正在使用python 3.5.2和最新版本的pip,遇到这个错误,有人告诉我应该怎么做吗? 在swig\parth\AppData\Local\Programs\Python35\lib\site-p tensorflow\Pytho

  • 当我复制一个编码为win1252的csv文件时,错误的字符会在Postgres数据库中显示出来。 它在postgres数据库11.3中使用datcollate和datctype编码en_us.utf8和es_es.utf8运行良好,在这两个数据库中,复制后字符显示正确。 它在带有datcollate和datctype编码en_us.utf8的postgres数据库9.4.9中不起作用 这是我正在使