2

Im trying to build my Android Studio project with Gradle. However I keep receiving the following error.

Execution failed for task ':app:mergeDebugResources'.

java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource compilation failed C:\Users\rhnow.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\ac23c912e546e4fe8c1c7df0b070c599\res\values\values.xml:1454:5-1461:13: AAPT: error: :style>.

C:\Users\rhnow.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\ac23c912e546e4fe8c1c7df0b070c599\res\values\values.xml:1454:5-1461:13: AAPT: error: :style>.

Ive tried to clean and rebuild along with downgrading gradle and SDK Versions.

Line 1454 - 1461

<style name="Base.AlertDialog.AppCompat" parent="android:Widget">
        <item name="android:layout">@layout/abc_alert_dialog_material</item>
        <item name="android:listLayout">@layout/abc_select_dialog_material</item>
        <item name="android:listItemLayout">@layout/select_dialog_item_material</item>
        <item name="android:multiChoiceItemLayout">@layout/select_dialog_multichoice_material</item>
        <item name="android:singleChoiceItemLayout">@layout/select_dialog_singlechoice_material</item>
        <item name="android:buttonIconDimen">@dimen/abc_alert_dialog_button_dimen</item>
    </style>

1 Answers1

0

Make sure you have an internet connection. The dependency/s might be downloaded incompleted. Make sure using latest Gradle plugins, if the plugins still throw and error, try to downgrade back to one-version-lower-than-latest. Is that AAPT v1? Use AAPT2 for Gradle plugin 3.0.0 and higher, refers here;

https://developer.android.com/studio/command-line/aapt2

Clean, Rebuild, and Make Project.

If nothing changed, try to Invalidate Cache, that also give you optional selection with and without restart the Android Studio. Hope this helps.

Infinite Loops
  • 671
  • 3
  • 11
  • 23