[英]Android Studio Execution failed for task ':app:processDebugResources'.
When I try to build my project, the Messages Gradle Build reports these messages:当我尝试构建我的项目时,Messages Gradle Build 会报告以下消息:
C:\...\src\main\res\values-v14\styles_app.xml
Error:(26, 5) Resource entry Theme.App already has bag item android:windowBackground.
Error:(26, 5) Originally defined here.
C:\...\build\intermediates\res\merged\debug\values\values.xml
Error:(233) Attribute "titleTextStyle" has already been defined
Error:(233) Attribute "subtitleTextStyle" has already been defined
Error:(233) Attribute "divider" has already been defined
Error:(233) Attribute "background" has already been defined
Error:(233) Attribute "backgroundSplit" has already been defined
Error:(261) Attribute "navigationMode" has already been defined
Error:(261) Attribute "displayOptions" has already been defined
Error:(261) Attribute "title" has already been defined
Error:(261) Attribute "subtitle" has already been defined
Error:(261) Attribute "icon" has already been defined
Error:(261) Attribute "logo" has already been defined
Error:(261) Attribute "backgroundStacked" has already been defined
Error:(261) Attribute "customNavigationLayout" has already been defined
Error:(261) Attribute "homeLayout" has already been defined
Error:(261) Attribute "progressBarStyle" has already been defined
Error:(261) Attribute "indeterminateProgressStyle" has already been defined
Error:(261) Attribute "progressBarPadding" has already been defined
Error:(261) Attribute "itemPadding" has already been defined
Error:(264) Attribute "initialActivityCount" has already been defined
Error:(264) Attribute "expandActivityOverflowButtonDrawable" has already been defined
Error:(267) Attribute "preserveIconSpacing" has already been defined
Error:(268) Attribute "iconifiedByDefault" has already been defined
Error:(268) Attribute "queryHint" has already been defined
Error:(276) Attribute "track" has already been defined
Error:(276) Attribute "thumbTextPadding" has already been defined
Error:(276) Attribute "switchTextAppearance" has already been defined
Error:(276) Attribute "switchMinWidth" has already been defined
Error:(276) Attribute "switchPadding" has already been defined
Error:(279) Attribute "windowActionBar" has already been defined
Error:(279) Attribute "windowNoTitle" has already been defined
Error:(279) Attribute "windowActionBarOverlay" has already been defined
Error:(279) Attribute "windowActionModeOverlay" has already been defined
Error:(279) Attribute "windowMinWidthMajor" has already been defined
Error:(279) Attribute "windowMinWidthMinor" has already been defined
Error:(279) Attribute "actionBarTabStyle" has already been defined
Error:(279) Attribute "actionBarTabBarStyle" has already been defined
Error:(279) Attribute "actionBarTabTextStyle" has already been defined
Error:(279) Attribute "actionOverflowButtonStyle" has already been defined
Error:(279) Attribute "actionBarStyle" has already been defined
Error:(279) Attribute "actionBarSplitStyle" has already been defined
Error:(279) Attribute "actionBarWidgetTheme" has already been defined
Error:(279) Attribute "actionBarSize" has already been defined
Error:(279) Attribute "actionBarDivider" has already been defined
Error:(279) Attribute "actionBarItemBackground" has already been defined
Error:(279) Attribute "actionMenuTextAppearance" has already been defined
Error:(279) Attribute "actionMenuTextColor" has already been defined
Error:(279) Attribute "actionModeStyle" has already been defined
Error:(279) Attribute "actionModeCloseButtonStyle" has already been defined
Error:(279) Attribute "actionModeBackground" has already been defined
Error:(279) Attribute "actionModeSplitBackground" has already been defined
Error:(279) Attribute "actionModeCloseDrawable" has already been defined
Error:(279) Attribute "actionModeShareDrawable" has already been defined
Error:(279) Attribute "actionModePopupWindowStyle" has already been defined
Error:(279) Attribute "textAppearanceLargePopupMenu" has already been defined
Error:(279) Attribute "textAppearanceSmallPopupMenu" has already been defined
Error:(279) Attribute "actionDropDownStyle" has already been defined
Error:(279) Attribute "dropdownListPreferredItemHeight" has already been defined
Error:(279) Attribute "spinnerDropDownItemStyle" has already been defined
Error:(279) Attribute "homeAsUpIndicator" has already been defined
Error:(279) Attribute "actionButtonStyle" has already been defined
Error:(279) Attribute "selectableItemBackground" has already been defined
Error:(279) Attribute "dividerVertical" has already been defined
Error:(279) Attribute "activityChooserViewStyle" has already been defined
Error:(279) Attribute "popupMenuStyle" has already been defined
Error:(279) Attribute "textAppearanceSearchResultTitle" has already been defined
Error:(279) Attribute "textAppearanceSearchResultSubtitle" has already been defined
Error:(279) Attribute "textColorSearchUrl" has already been defined
Error:(279) Attribute "listPreferredItemHeightSmall" has already been defined
Error:(279) Attribute "listPreferredItemPaddingLeft" has already been defined
Error:(279) Attribute "listPreferredItemPaddingRight" has already been defined
Error:(279) Attribute "dropDownListViewStyle" has already been defined
Error:(279) Attribute "listPopupWindowStyle" has already been defined
Error:(279) Attribute "textAppearanceListItemSmall" has already been defined
Error:(279) Attribute "buttonStyleSmall" has already been defined
C:\...\build\intermediates\res\merged\debug\values-v23\values-v23.xml
Error:(3) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
Error:(18) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\android-sdk-windows\build-tools\23.0.3\aapt.exe'' finished with non-zero exit value 1
correspondingly in the Gradle Console it is reported:相应地,在 Gradle 控制台中会报告:
AGPBI: {"kind":"error","text":"Resource entry Theme.app already has bag item android:windowBackground.","sources":[{"file":"C:\\...\\src\\main\\res\\values-v14\\styles_app.xml","position":{"startLine":25,"startColumn":4,"startOffset":1049,"endLine":39,"endColumn":10,"endOffset":2401}}],"original":"","tool":"AAPT"}
.
.
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\android-sdk-windows\build-tools\23.0.3\aapt.exe'' finished with non-zero exit value 1
what's the problem?有什么问题?
NOTE: the question reported here Android: Execution failed for task ':app:processDebugResources' is with no solution.注意:这里报告的问题Android: Execution failed for task ':app:processDebugResources'没有解决方案。
I found the solution:我找到了解决方案:
1) eliminate the android:windowBackground duplicate form values-v14\\styles_app.xml; 1)消除android:windowBackground重复表单values-v14\\styles_app.xml;
2) as found in different threads, if you use the "actionBarSherlock" library, you should not use appCompact v7, so you need to set the 7.0.0 version of the play-services in build.gradle project, because this is the last version does not contain it. 2)如在不同线程中发现,如果使用“actionBarSherlock”库,则不应使用appCompact v7,因此需要在build.gradle项目中设置7.0.0版本的play-services,因为这是最后一个版本不包含它。
3)In the project manifest file you must set: 3)在项目清单文件中,您必须设置:
4) the minSdkVersion version, in librarySlidingMenu gradle file, must not be lower than that set in the Sherlocks library Manifest file. 4)librarySlidingMenu gradle文件中的minSdkVersion版本不得低于Sherlocks库Manifest文件中设置的版本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.