我刚刚将支持库从27更新到了28,但构建失败并出现以下错误:
Android resource compilation failed
Output: /AndroidProjects/Brand App/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:1052: error: duplicate value for resource 'attr/strokeWidth' with config ''.
/AndroidProjects/Brand App/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:1052: error: resource previously defined here.
Command: /Users/apple/.gradle/caches/transforms-1/files-1.1/aapt2-3.2.0-4818971-osx.jar/509e285e62be11c8bb7437cdd445c1df/aapt2-3.2.0-4818971-osx/aapt2 compile --legacy \
-o \
/AndroidProjects/Brand App/app/build/intermediates/res/merged/debug \
/AndroidProjects/Brand App/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml
Daemon: AAPT2 aapt2-3.2.0-4818971-osx Daemon #0
Run Code Online (Sandbox Code Playgroud)
小智 4
面临同样的问题,我的问题是配置文件中的 attr/shape ,该问题基本上与使用 android 默认库的库冲突有关,请粘贴完整的问题并更新您正在使用的任何第三方库,它将起作用。我更新了其中一个库,问题就解决了。因为我使用的是旧版本的 com.facebook.shimmer 并且我刚刚在 gradle 中更新了它并且它起作用了。
| 归档时间: |
|
| 查看次数: |
1751 次 |
| 最近记录: |