简体   繁体   English

Jenkins构建Android的Aapt2问题

[英]Aapt2 issue with jenkins build Android

I'm using Jenkins to build my android application. 我正在使用Jenkins构建我的android应用程序。 I have an issue with Aapt2 when I'm trying to build task "assemble". 我在尝试构建任务“汇编”时遇到Aapt2问题。
I have added the android.enableAapt2 = true but I still have the issue. 我已经添加了android.enableAapt2 = true但仍然存在问题。

Error : 错误:

Execution failed for task ':app:mergeDebugResources'.
> java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource compilation failed
  Output:  C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.1.1.aar\9b13819df5a46cfa71ada9be5d91c322\res\layout\abc_search_dropdown_item_icons_2line.xml: error: file not found.

  Command: C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\bc9c8887a50f76d929803eb5bfe61459\aapt2-3.2.1-4818971-windows\aapt2.exe compile --legacy \
          -o \
          D:\jenkins\workspace\DemoProject\app\build\intermediates\res\merged\debug \
          C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.1.1.aar\9b13819df5a46cfa71ada9be5d91c322\res\layout\abc_search_dropdown_item_icons_2line.xml
  Daemon:  AAPT2 aapt2-3.2.1-4818971-windows Daemon #2

Looks like aapt2 is having trouble parsing the file path (it's too long). 看起来aapt2无法解析文件路径(太长)。 You can either try upgrading to the newest android gradle plugin which has better support for long paths, or you can try moving your gradle cache closer to the C: root. 您可以尝试升级到对长路径有更好支持的最新android gradle插件,也可以尝试将gradle缓存移到C:根附近。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM