问题描述
好吧,我试图让ActionBarSherlock的工作,所以我采用进口的库:
创建新的项目和GT;创建项目从现有的源>从ActionBarSherlock文件夹中选择库
在我进口的样本示例项目文件夹使用相同的方法,无论是图书馆和样品都设置为Android的15构建路径!
我的问题是,超过100个错误想出在图书馆,各种东西约调用需要API级别11,我不知道什么是错!
东西我都试过:
清洁工程
设置构建路径,以13,14和15
大多数错误说:
调用需要API级别11(目前最小的8):android.app.something
更新:我试着右击的库文件,然后单击添加到构建路径,没有工作,这几个是我得到了错误的:
描述资源路径位置类型
类型MenuWrapper的方法Add(CharSequence的)必须覆盖一个超类方法MenuWrapper.java / com_actionbarsherlock / src目录/ COM / actionbarsherlock /内部/浏览/菜单行33 Java问题
式的方法添加(INT,INT,INT的CharSequence)MenuWrapper必须重写超类方法MenuWrapper.java / com_actionbarsherlock / src目录/ COM / actionbarsherlock /内部/浏览/菜单行43 Java问题
类型MenuWrapper的方法Add(INT,INT,INT,INT)必须覆盖一个超类方法MenuWrapper.java / com_actionbarsherlock / src目录/ COM / actionbarsherlock /内部/浏览/菜单行48 Java问题
类型MenuWrapper的方法Add(INT)必须覆盖一个超类方法MenuWrapper.java / com_actionbarsherlock / src目录/ COM / actionbarsherlock /内部/浏览/菜单38行的Java问题
该方法addIntentOptions(INT,INT,INT,组件名称,意图[],意图,INT,菜单项[])类型的MenuWrapper必须覆盖一个超类方法MenuWrapper.java / com_actionbarsherlock / src目录/ COM / actionbarsherlock /内部/浏览/菜单行81 Java问题
该方法addOnAttachStateChangeListener类型ActionMenuItemView的(View_OnAttachStateChangeListener)必须覆盖一个超类方法ActionMenuItemView.java / com_actionbarsherlock / src目录/ COM / actionbarsherlock /内部/浏览/菜单行84 Java问题
该方法addOnAttachStateChangeListener类型ActionMenu presenter.OverflowMenuButton(View_OnAttachStateChangeListener)必须覆盖父类方法ActionMenu presenter.java / com_actionbarsherlock / src目录/ COM / actionbarsherlock /内部/浏览/菜单行627 Java问题
类型MenuWrapper的方法addSubMenu(CharSequence的)必须覆盖一个超类方法MenuWrapper.java / com_actionbarsherlock / src目录/ COM / actionbarsherlock /内部/浏览/菜单行61 Java问题
类型MenuWrapper的方法addSubMenu(INT,INT,INT,CharSequence中)必须覆盖一个超类方法MenuWrapper.java / com_actionbarsherlock / src目录/ COM / actionbarsherlock /内部/浏览/菜单行71 Java问题
类型MenuWrapper的方法addSubMenu(INT,INT,INT,INT)必须覆盖一个超类方法MenuWrapper.java / com_actionbarsherlock / src目录/ COM / actionbarsherlock /内部/浏览/菜单行76 Java问题
类型MenuWrapper的方法addSubMenu(INT)必须覆盖一个超类方法MenuWrapper.java / com_actionbarsherlock / src目录/ COM / actionbarsherlock /内部/浏览/菜单行66 Java问题
类型MenuWrapper的方法,明确的()必须覆盖一个超类方法MenuWrapper.java / com_actionbarsherlock / src目录/ COM / actionbarsherlock /内部/浏览/菜单行101 Java问题
类型SubMenuWrapper的方法clearHeader()必须覆盖一个超类方法SubMenuWrapper.java / com_actionbarsherlock / src目录/ COM / actionbarsherlock /内部/浏览/菜单行49 Java问题
类型MenuWrapper的方法关闭()必须覆盖一个超类方法MenuWrapper.java / com_actionbarsherlock / src目录/ COM / actionbarsherlock /内部/浏览/菜单行157 Java问题
类型ActionMenuItem的方法collapseActionView()必须覆盖一个超类方法ActionMenuItem.java / com_actionbarsherlock / src目录/ COM / actionbarsherlock /内部/浏览/菜单行264 Java问题
类型MenuItemImpl的方法collapseActionView()必须覆盖一个超类方法MenuItemImpl.java / com_actionbarsherlock / src目录/ COM / actionbarsherlock /内部/浏览/菜单行612 Java问题
类型MenuItemWrapper的方法collapseActionView()必须覆盖一个超类方法MenuItemWrapper.java / com_actionbarsherlock / src目录/ COM / actionbarsherlock /内部/浏览/菜单行254 Java问题
该方法collapseItemActionView类型ActionBarView.ExpandedActionViewMenu presenter(使用MenuBuilder,MenuItemImpl)必须覆盖一个超类方法ActionBarView.java / com_actionbarsherlock / src目录/ COM / actionbarsherlock /内部/插件线1497的Java问题
类型ActionMenu presenter.SavedState的方法describeContents()必须覆盖父类方法ActionMenu presenter.java / com_actionbarsherlock / src目录/ COM / actionbarsherlock /内部/浏览/菜单行557 Java问题
类型ActionMenuItem的方法expandActionView()必须覆盖一个超类方法ActionMenuItem.java / com_actionbarsherlock / src目录/ COM / actionbarsherlock /内部/浏览/菜单行259 Java问题
类型MenuItemImpl的方法expandActionView()必须覆盖一个超类方法MenuItemImpl.java / com_actionbarsherlock / src目录/ COM / actionbarsherlock /内部/浏览/菜单行598 Java问题
类型MenuItemWrapper的方法expandActionView()必须覆盖一个超类方法MenuItemWrapper.java / com_actionbarsherlock / src目录/ COM / actionbarsherlock /内部/浏览/菜单行249 Java问题
该方法expandItemActionView类型ActionBarView.ExpandedActionViewMenu presenter(使用MenuBuilder,MenuItemImpl)必须覆盖一个超类方法ActionBarView.java / com_actionbarsherlock / src目录/ COM / actionbarsherlock /内部/插件线1471的Java问题
类型MenuWrapper的方法,则findItem(INT)必须覆盖一个超类方法MenuWrapper.java / com_actionbarsherlock / src目录/ COM / actionbarsherlock /内部/浏览/菜单行127 Java问题
类型ActionBarView.ExpandedActionViewMenu presenter的方法flagActionItems()必须覆盖一个超类方法ActionBarView.java / com_actionbarsherlock / src目录/ COM / actionbarsherlock /内部/插件线1466的Java问题
类型MenuPopupHelper的方法flagActionItems()必须覆盖一个超类方法MenuPopupHelper.java / com_actionbarsherlock / src目录/ COM / actionbarsherlock /内部/浏览/菜单行280 Java问题
类型ActionMenuItem的方法getActionProvider()必须覆盖一个超类方法ActionMenuItem.java / com_actionbarsherlock / src目录/ COM / actionbarsherlock /内部/浏览/菜单行243 Java问题
类型MenuItemWrapper的方法getActionProvider()必须覆盖一个超类方法MenuItemWrapper.java / com_actionbarsherlock / src目录/ COM / actionbarsherlock /内部/浏览/菜单行240 Java问题
类型MenuItemWrapper的方法getActionView()必须覆盖一个超类方法MenuItemWrapper.java / com_actionbarsherlock / src目录/ COM / actionbarsherlock /内部/浏览/菜单行229 Java问题
类型MenuItemWrapper的方法getAlphabeticShortcut()必须覆盖一个超类方法MenuItemWrapper.java / com_actionbarsherlock / src目录/ COM / actionbarsherlock /内部/浏览/菜单行123 Java问题
- 转到项目属性> Java编译器。使用JDK 1.6。
- 确保您编译两个库,并采用Android 4.0 + 您的应用程序
- 确保您的targetSdkVersion为14或更高。
Okay, I'm trying to get ActionBarSherlock working, so I imported the library by:
Creating New Project > Create Project From Existing Source > Choosing library from the ActionBarSherlock folder
After that I imported a example project from the samples folder using the same method, Both the library and the sample are set to Android 15 Build Path!
My problem is, over 100 errors come up in the library, all kinds of stuff about Call requires api level 11, And I have no idea whats wrong!
Things I have tried:
Cleaning Project
Setting build path to 13, 14 and 15
Most of the errors say:
Call requires API level 11 (current min is 8): android.app.something
Update: I tried right clicking on the lib file and clicking add to build path, that didnt work, these are a few of the errors that I'm getting:
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
- Go to Project Properties > Java Compiler. Use JDK 1.6.
- Ensure you're compiling both the library and your app with Android 4.0+
- Ensure your targetSdkVersion is 14 or higher.
这篇关于ActionBarSherlock库是充满了错误被导入后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!