1

I read this Error after adding dependencies to Action Bar Sherlock in Android Studio 0.5.8 but didn't help me.

i found several android custom dialog library in github. but gradle gives me theis error when i include each one in dependencies :

Warning:string 'abs__activity_chooser_view_dialog_title_default' has no default translation.
Warning:string 'abs__share_action_provider_share_with' has no default translation.
F:\Work\workspace\NITask\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.3\res\values\values.xml
Error:Attribute "titleTextStyle" has already been defined
Error:Attribute "subtitleTextStyle" has already been defined
Error:Attribute "divider" has already been defined
Error:Attribute "background" has already been defined
Error:Attribute "backgroundSplit" has already been defined
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 "dropDownListViewStyle" has already been defined
Error:Attribute "listPopupWindowStyle" has already been defined
Error:Attribute "textAppearanceListItemSmall" has already been defined
Error:Execution failed for task ':app:processDebugResources'.

i try four library but gives me same errors.

Community
  • 1
  • 1
Alex Mercer
  • 475
  • 1
  • 5
  • 14

1 Answers1

2

Put this into android { section of your build.gradle:

dexOptions {
    preDexLibraries = true
}

If that does not work try to remove libraries which are already declared in subprojects. For example if any subproject has an "appcompat" dependency and you have one declared in main project - remove the "appcompat" dependency in your main project.

Demonick
  • 2,116
  • 3
  • 30
  • 40
  • dexOptions dont work for me . i remove appcompat in some modules that submodules already have . no error any more . tnx @Demonick – Alex Mercer May 15 '15 at 12:04