1

Ich habe eine Anwendung programmiert, die Tweets posten kann und Sie können Benutzer Zeitleisten und Suchzeiten damit anzeigen. Ich habe das mit der TwitterAPI und fabric.io getan. Und wenn ich eine APK-Datei erzeugen oder die Gradle Datei synchronisieren möchte, erhalte ich folgende Fehler:Fehler: (144) Attribut "srcCompat" wurde bereits definiert

C: \ Benutzer \ Alexander \ AndroidStudioProjekte \ FacebookPlus \ app \ build \ intermediates \ res \ fusioniert \ debug \ values ​​\ values .xml

Fehler: Fehler bei der Ausführung für die Task ': App: processDebugResources' (140) Attribut "srcCompat" bereits

Fehler definiert.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\Alexander\AppData\Local\Android\sdk1\build-tools\23.0.2\aapt.exe'' finished with non-zero exit value 1

Antwort

0

hatte ich das gleiche Problem, aber ich fand eine praktikable Lösung. Hier ist die link. Hoffentlich sortiert es dich aus ...

+0

Vielen Dank !!!! Du bist der beste Kerl, es hat auch für mich funktioniert !! So glücklich jetzt! :) – AleXoTroN

+0

Yaay! Alles Gute ...! – ErickPaul

+0

ich danke dir sehr :) – AleXoTroN

0

app:srcCompat ist ein XML-Attribut in der Regel zu Ansichten wie ImageView angewendet.

Vielleicht haben Sie dieses Attribut zweimal in derselben Ansicht deklariert.

+0

Danke für die Antwort! Ich werde in meiner ganzen Ansicht schauen und dann erzähle ich dir das Ergebnis – AleXoTroN

+0

Alan_UK Wenn ich auf den Fehler klicke, komme ich jedes Mal auf diesen Pfad: "MyApp> app> build> Intermediates> res> Zusammengeführt> debug> werte> werte. xml ". Bedeutet das etwas? – AleXoTroN

+0

Sie müssen Ihre strings.xml Datei überprüfen und entfernen alle duplizierten Werte, die Ihr Problem lösen können – AlanC92

0

Antwort für Alan_UK Antrag - Ich kann nicht den vollständigen Inhalt veröffentlichen, weil es zu lang ist. Ich poste nur den Inhalt, der die doppelten Attribute

<?xml version="1.0" encoding="utf-8"?> 
<resources xmlns:ns1="http://schemas.android.com/tools"> 
<attr format="reference" name="backgroundCompat"/> 
<attr format="reference|color" name="dgts__accentColor"/> 
<attr format="reference" name="dgts__logoDrawable"/> 
<attr format="reference" name="drawerArrowStyle"/> 
<attr format="dimension" name="height"/> 
<attr format="boolean" name="isInScrollContainer"/> 
<attr format="boolean" name="isLightTheme"/> 
<attr format="reference" name="srcCompat"/> 
<attr format="string" name="title"/> 
<attr format="reference" name="tw__twitter_logo"/> 
<bool name="abc_action_bar_embed_tabs">true</bool> 
<bool name="abc_action_bar_embed_tabs_pre_jb">false</bool> 
<bool name="abc_action_bar_expanded_action_views_exclusive">true</bool> 
<bool name="abc_allow_stacked_button_bar">true</bool> 
<bool name="abc_config_actionMenuItemAllCaps">true</bool> 
<bool name="abc_config_allowActionMenuItemTextWithIcon">false</bool> 
<bool name="abc_config_closeDialogWhenTouchOutside">true</bool> 
<bool name="abc_config_showMenuShortcutsWhenKeyboardPresent">false</bool> 
<color name="abc_input_method_navigation_guard">@android:color/black</color> 
<color name="abc_search_url_text_normal">#7fa87f</color> 
<color name="abc_search_url_text_pressed">@android:color/black</color> 
<color name="abc_search_url_text_selected">@android:color/black</color> 
<color name="accent_material_dark">@color/material_deep_teal_200</color> 
<color name="accent_material_light">@color/material_deep_teal_500</color> 
<color name="background_floating_material_dark">@color/material_grey_800</color> 
<color name="background_floating_material_light">@android:color/white</color> 
<color name="background_material_dark">@color/material_grey_850</color> 
<color name="background_material_light">@color/material_grey_50</color> 
<color name="bright_foreground_disabled_material_dark">#80ffffff</color> 
<color name="bright_foreground_disabled_material_light">#80000000</color> 
<color name="bright_foreground_inverse_material_dark">@color/bright_foreground_material_light</color> 
<color name="bright_foreground_inverse_material_light">@color/bright_foreground_material_dark</color> 
<color name="bright_foreground_material_dark">@android:color/white</color> 
<color name="bright_foreground_material_light">@android:color/black</color> 
<color name="button_material_dark">#ff5a595b</color> 
<color name="button_material_light">#ffd6d7d7</color> 
<color name="colorAccent">#e99224</color> 
<color name="colorAccentDark">#004676</color> 
<color name="colorPrimary">#25c7ac</color> 
<color name="colorPrimaryDark">#1d9f8a</color> 
<color name="colorfb">#32588e</color> 
<color name="design_fab_shadow_end_color">@android:color/transparent</color> 
<color name="design_fab_shadow_mid_color">#14000000</color> 
<color name="design_fab_shadow_start_color">#44000000</color> 
<color name="design_fab_stroke_end_inner_color">#0A000000</color> 
<color name="design_fab_stroke_end_outer_color">#0F000000</color> 
<color name="design_fab_stroke_top_inner_color">#1AFFFFFF</color> 
<color name="design_fab_stroke_top_outer_color">#2EFFFFFF</color> 
<color name="design_snackbar_background_color">#323232</color> 
<color name="design_textinput_error_color_dark">#FFFF6E6E</color> 
<color name="design_textinput_error_color_light">#FFD50000</color> 
<color name="dgts__default_accent">#5baaf4</color> 
<color name="dgts__default_logo_name">#56626d</color> 
<color name="dgts__purple">#744eaa</color> 
<color name="dgts__purple_pressed">#553788</color> 
<color name="dgts__text_dark">#ff030303</color> 
<color name="dgts__text_light">#ffffff</color> 
<color name="dim_foreground_disabled_material_dark">#80bebebe</color> 
<color name="dim_foreground_disabled_material_light">#80323232</color> 
<color name="dim_foreground_material_dark">#ffbebebe</color> 
<color name="dim_foreground_material_light">#ff323232</color> 
<color name="disabled">#d1d1d1</color> 
<color name="error">#ff2424</color> 
<color name="foreground_material_dark">@android:color/white</color> 
<color name="foreground_material_light">@android:color/black</color> 
<color name="grey">#9e9e9e</color> 
<color name="highlighted_text_material_dark">#6680cbc4</color> 
<color name="highlighted_text_material_light">#66009688</color> 
<color name="hint_foreground_material_dark">@color/bright_foreground_disabled_material_dark</color> 
<color name="hint_foreground_material_light">@color/bright_foreground_disabled_material_light</color> 
<color name="material_blue_grey_800">#ff37474f</color> 
<color name="material_blue_grey_900">#ff263238</color> 
<color name="material_blue_grey_950">#ff21272b</color> 
<color name="material_deep_teal_200">#ff80cbc4</color> 
<color name="material_deep_teal_500">#ff009688</color> 
<color name="material_grey_100">#fff5f5f5</color> 
<color name="material_grey_300">#ffe0e0e0</color> 
<color name="material_grey_50">#fffafafa</color> 
<color name="material_grey_600">#ff757575</color> 
<color name="material_grey_800">#ff424242</color> 
<color name="material_grey_850">#ff303030</color> 
<color name="material_grey_900">#ff212121</color> 
<color name="primary_dark_material_dark">@android:color/black</color> 
<color name="primary_dark_material_light">@color/material_grey_600</color> 
<color name="primary_material_dark">@color/material_grey_900</color> 
<color name="primary_material_light">@color/material_grey_100</color> 
<color name="primary_text_default_material_dark">#ffffffff</color> 
<color name="primary_text_default_material_light">#de000000</color> 
<color name="primary_text_disabled_material_dark">#4Dffffff</color> 
<color name="primary_text_disabled_material_light">#39000000</color> 
<color name="ripple_material_dark">#33ffffff</color> 
<color name="ripple_material_light">#1f000000</color> 
<color name="secondary_text_default_material_dark">#b3ffffff</color> 
<color name="secondary_text_default_material_light">#8a000000</color> 
<color name="secondary_text_disabled_material_dark">#36ffffff</color> 
<color name="secondary_text_disabled_material_light">#24000000</color> 
<color name="subtitle">#96ffffff</color> 
<color name="sv_bgcolor">#d2000000</color> 
<color name="switch_thumb_disabled_material_dark">#ff616161</color> 
<color name="switch_thumb_disabled_material_light">#ffbdbdbd</color> 
<color name="switch_thumb_normal_material_dark">#ffbdbdbd</color> 
<color name="switch_thumb_normal_material_light">#fff1f1f1</color> 
<color name="trans">#7cffffff</color> 
<color name="tt_accent">#0099ff</color> 
<color name="tt_accentdark">#0084dc</color> 
<color name="tw__blue_default">#FF5BAAF4</color> 
<color name="tw__blue_pressed">#FF4186C8</color> 
<color name="tw__blue_pressed_light">#ffe1e8ed</color> 
<color name="tw__composer_black">#ff292f33</color> 
<color name="tw__composer_blue">#ff1da1f2</color> 
<color name="tw__composer_blue_text">#ff1b95e0</color> 
<color name="tw__composer_deep_gray">#ff8899A6</color> 
<color name="tw__composer_light_gray">#ffccd6dd</color> 
<color name="tw__composer_red">#ffe81c4f</color> 
<color name="tw__composer_white">#ffffffff</color> 
<color name="tw__light_gray">#ccd6dd</color> 
<color name="tw__medium_gray">#8899a6</color> 
<color name="tw__seekbar_thumb_inner_color">#ffffffff</color> 
<color name="tw__seekbar_thumb_outer_color">#4dffffff</color> 
<color name="tw__solid_white">#FFFFFFFF</color> 
<color name="tw__transparent">#00000000</color> 
<color name="tw__tweet_action_color">#55acee</color> 
<color name="tw__tweet_action_dark_highlight_color">#667580</color> 
<color name="tw__tweet_action_light_highlight_color">#ebeef0</color> 
<color name="tw__tweet_dark_container_bg_color">#d9000000</color> 
<color name="tw__tweet_dark_primary_text_color">#e1ffffff</color> 
<color name="tw__tweet_light_container_bg_color">#ffffff</color> 
<color name="tw__tweet_light_primary_text_color">#292f33</color> 
<declare-styleable name="ActionBar"><attr name="navigationMode"><enum name="normal" value="0"/><enum name="listMode" value="1"/><enum name="tabMode" value="2"/></attr><attr name="displayOptions"><flag name="none" value="0"/><flag name="useLogo" value="0x1"/><flag name="showHome" value="0x2"/><flag name="homeAsUp" value="0x4"/><flag name="showTitle" value="0x8"/><flag name="showCustom" value="0x10"/><flag name="disableHome" value="0x20"/></attr><attr name="title"/><attr format="string" name="subtitle"/><attr format="reference" name="titleTextStyle"/><attr format="reference" name="subtitleTextStyle"/><attr format="reference" name="icon"/><attr format="reference" name="logo"/><attr format="reference" name="divider"/><attr format="reference" name="background"/><attr format="reference|color" name="backgroundStacked"/><attr format="reference|color" name="backgroundSplit"/><attr format="reference" name="customNavigationLayout"/><attr name="height"/><attr format="reference" name="homeLayout"/><attr format="reference" name="progressBarStyle"/><attr format="reference" name="indeterminateProgressStyle"/><attr format="dimension" name="progressBarPadding"/><attr name="homeAsUpIndicator"/><attr format="dimension" name="itemPadding"/><attr format="boolean" name="hideOnContentScroll"/><attr format="dimension" name="contentInsetStart"/><attr format="dimension" name="contentInsetEnd"/><attr format="dimension" name="contentInsetLeft"/><attr format="dimension" name="contentInsetRight"/><attr format="dimension" name="elevation"/><attr format="reference" name="popupTheme"/></declare-styleable> 
<declare-styleable name="ActionBarLayout"><attr name="android:layout_gravity"/></declare-styleable> 
<declare-styleable name="ActionMenuItemView"><attr name="android:minWidth"/></declare-styleable> 
<declare-styleable name="ActionMenuView"/> 
<declare-styleable name="ActionMode"><attr name="titleTextStyle"/><attr name="subtitleTextStyle"/><attr name="background"/><attr name="backgroundSplit"/><attr name="height"/><attr format="reference" name="closeItemLayout"/></declare-styleable> 
<declare-styleable name="ActivityChooserView"><attr format="string" name="initialActivityCount"/><attr format="reference" name="expandActivityOverflowButtonDrawable"/></declare-styleable> 
<declare-styleable name="AlertDialog"><attr name="android:layout"/><attr format="reference" name="buttonPanelSideLayout"/><attr format="reference" name="listLayout"/><attr format="reference" name="multiChoiceItemLayout"/><attr format="reference" name="singleChoiceItemLayout"/><attr format="reference" name="listItemLayout"/></declare-styleable> 
<declare-styleable name="AppBarLayout"><attr name="elevation"/><attr name="android:background"/><attr format="boolean" name="expanded"/></declare-styleable> 
<declare-styleable name="AppBarLayout_LayoutParams"><attr name="layout_scrollFlags"><flag name="scroll" value="0x1"/><flag name="exitUntilCollapsed" value="0x2"/><flag name="enterAlways" value="0x4"/><flag name="enterAlwaysCollapsed" value="0x8"/><flag name="snap" value="0x10"/></attr><attr format="reference" name="layout_scrollInterpolator"/></declare-styleable> 
<declare-styleable name="AppCompatImageView"><attr name="android:src"/><attr format="reference" name="srcCompat"/></declare-styleable> 
0

enthält Ich hatte dieses Problem auch.

In meinem Fall war das Problem, dass die Support-Bibliotheken in meinem Gradle-Datei-Abhängigkeitsabschnitt alle die gleiche Version sein sollten.

Mehr Infos hier: Gradle error "Attribute "xxx" has already been defined" in Android Studio

+0

Danke für Ihre Antwort, ich werde es versuchen! :) – AleXoTroN

+0

Ich habe nicht funktioniert :((sry für mein Englisch, wenn es nicht korrekt ist) – AleXoTroN

+0

Bearbeiten Sie Ihre Frage und fügen Sie Ihre App hinzu. Gradle Datei Inhalt Vielleicht können wir dort etwas sehen –

Verwandte Themen