错误:具有配置''的attr / style的值重复

时间:2018-09-27 10:26:14

标签: android gradle

将Android Studio升级到最新版本后,它会继续显示此错误,而我根本无法运行代码!

这是错误

Android resource compilation failed
Output:  C:\Users\Khairy\Desktop\Patient App\android-patient-app\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:1072: error: duplicate value for resource 'attr/style' with config ''.
C:\Users\Khairy\Desktop\Patient App\android-patient-app\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:1072: error: resource previously defined here.

Command: C:\Users\Khairy\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.0-4818971-windows.jar\dd46b604dd8462c5ee8864f277da747e\aapt2-3.2.0-4818971-windows\aapt2.exe compile --legacy \
        -o \
        C:\Users\Khairy\Desktop\Patient App\android-patient-app\app\build\intermediates\res\merged\debug \
        C:\Users\Khairy\Desktop\Patient App\android-patient-app\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml
Daemon:  AAPT2 aapt2-3.2.0-4818971-windows Daemon #0

1 个答案:

答案 0 :(得分:0)

  

错误:配置“”的资源“ attr/style”的重复值

检查values.xmlstyles.xml以查看是否有重复的输入字符串。 (也许称为attr/style

您还可以尝试删除intermediatesbuild目录,然后执行清理重建项目,然后它应能按预期工作。