在Android Studio 0.8.9中导入actionbarsherlock

时间:2022-11-21 16:09:45

I have a problem when importing ActionBarSherlock. I'm using Android Studio 0.8.9. I modify my build.gradle file according this. But I got errors telling that can not resolve symbol R.

我在导入ActionBarSherlock时遇到了一个问题。我用的是Android Studio 0.8.9。我修改我的构建。gradle文件显示。但是我得到了不能解析符号R的错误。

Here are the error messages after importing ActionBarSherlock:

以下是导入ActionBarSherlock之后的错误消息:

Information:Gradle tasks [:app:generateDebugSources, :app:generateDebugTestSources]
:app:preBuild
:app:preDebugBuild
:app:checkDebugManifest
:app:preReleaseBuild
:app:prepareComActionbarsherlockActionbarsherlock440Library UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72000Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42000Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServices5089Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources
D:\CodeBunch\Android\DataBudaya\app\build\intermediates\exploded-aar\com.actionbarsherlock\actionbarsherlock\4.4.0\res\values\values.xml
Error:Attribute "navigationMode" has already been defined
Error:Attribute "displayOptions" has already been defined
Error:Attribute "title" has already been defined
Error:Attribute "subtitle" has already been defined
Error:Attribute "icon" has already been defined
Error:Attribute "logo" has already been defined
Error:Attribute "backgroundStacked" has already been defined
Error:Attribute "customNavigationLayout" has already been defined
Error:Attribute "homeLayout" has already been defined
Error:Attribute "progressBarStyle" has already been defined
Error:Attribute "indeterminateProgressStyle" has already been defined
Error:Attribute "progressBarPadding" has already been defined
Error:Attribute "itemPadding" has already been defined
Error:Attribute "initialActivityCount" has already been defined
Error:Attribute "expandActivityOverflowButtonDrawable" has already been defined
Error:Attribute "iconifiedByDefault" has already been defined
Error:Attribute "queryHint" has already been defined
Error:Attribute "actionBarTabStyle" has already been defined
Error:Attribute "actionBarTabBarStyle" has already been defined
Error:Attribute "actionBarTabTextStyle" has already been defined
Error:Attribute "actionOverflowButtonStyle" has already been defined
Error:Attribute "actionBarStyle" has already been defined
Error:Attribute "actionBarSplitStyle" has already been defined
Error:Attribute "actionBarWidgetTheme" has already been defined
Error:Attribute "actionBarSize" has already been defined
Error:Attribute "actionBarDivider" has already been defined
Error:Attribute "actionBarItemBackground" has already been defined
Error:Attribute "actionMenuTextAppearance" has already been defined
Error:Attribute "actionMenuTextColor" has already been defined
Error:Attribute "actionModeStyle" has already been defined
Error:Attribute "actionModeCloseButtonStyle" has already been defined
Error:Attribute "actionModeBackground" has already been defined
Error:Attribute "actionModeSplitBackground" has already been defined
Error:Attribute "actionModeCloseDrawable" has already been defined
Error:Attribute "actionModeShareDrawable" has already been defined
Error:Attribute "actionModePopupWindowStyle" has already been defined
Error:Attribute "selectableItemBackground" has already been defined
Error:Attribute "textAppearanceLargePopupMenu" has already been defined
Error:Attribute "textAppearanceSmallPopupMenu" has already been defined
Error:Attribute "spinnerDropDownItemStyle" has already been defined
Error:Attribute "searchDropdownBackground" has already been defined
Error:Attribute "searchViewCloseIcon" has already been defined
Error:Attribute "searchViewGoIcon" has already been defined
Error:Attribute "searchViewSearchIcon" has already been defined
Error:Attribute "searchViewVoiceIcon" has already been defined
Error:Attribute "searchViewEditQuery" has already been defined
Error:Attribute "searchViewEditQueryBackground" has already been defined
Error:Attribute "searchViewTextField" has already been defined
Error:Attribute "searchViewTextFieldRight" has already been defined
Error:Attribute "textColorSearchUrl" has already been defined
Error:Attribute "searchResultListItemHeight" has already been defined
Error:Attribute "textAppearanceSearchResultTitle" has already been defined
Error:Attribute "textAppearanceSearchResultSubtitle" has already been defined
Error:Attribute "listPreferredItemHeightSmall" has already been defined
Error:Attribute "listPreferredItemPaddingLeft" has already been defined
Error:Attribute "listPreferredItemPaddingRight" has already been defined
Error:Attribute "textAppearanceListItemSmall" has already been defined
Error:Attribute "dividerVertical" has already been defined
Error:Attribute "actionButtonStyle" has already been defined
Error:Attribute "homeAsUpIndicator" has already been defined
Error:Attribute "dropDownListViewStyle" has already been defined
Error:Attribute "windowActionBar" has already been defined
Error:Attribute "windowActionBarOverlay" has already been defined
Error:Attribute "windowSplitActionBar" has already been defined
Error:Attribute "listPopupWindowStyle" has already been defined
Error:Attribute "activityChooserViewStyle" has already been defined

I will appreciate any helps. Thank you.

我将感激你的帮助。谢谢你!

1 个解决方案

#1


11  

You are using the appcompat-v7 and ActionBarSherlock together.

您正在使用appcompat-v7和ActionBarSherlock。

You can't do it, because they both provide the same style attributes.

您不能这样做,因为它们都提供相同的样式属性。

You have to remove one of these libraries.

您必须删除其中一个库。

#1


11  

You are using the appcompat-v7 and ActionBarSherlock together.

您正在使用appcompat-v7和ActionBarSherlock。

You can't do it, because they both provide the same style attributes.

您不能这样做,因为它们都提供相同的样式属性。

You have to remove one of these libraries.

您必须删除其中一个库。