3

Using team city to build and android app. keep getting an error.

[16:59:38] [Step 1/1] Execution failed for task ':app:mergeDebugResources'. org.gradle.internal.UncheckedException: 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-28.0.0.aar\3467ebf6f9d1bb66db4bdb226db55512\res\drawable-hdpi-v4\abc_ic_menu_share_mtrl_alpha.png: error: file not found.

Command: C:\Windows\System32\config\systemprofile.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\8a1ce91548f2547bb27874a553d3981d\aapt2-3.2.1-4818971-windows\aapt2.exe compile --no-crunch \ --legacy \ -o \ C:\TeamCity\buildAgent\work\7028d0f31da34ed0\Workshop\app\build\intermediates\res\merged\debug \ C:\Windows\System32\config\systemprofile.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\3467ebf6f9d1bb66db4bdb226db55512\res\drawable-hdpi-v4\abc_ic_menu_share_mtrl_alpha.png Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #1

The file it says it can't find is definitely there. I'm a .net developer with hardly any experience of android development so I have no idea what to look at next in order to fix this. please help.

user1450877
  • 421
  • 5
  • 16

1 Answers1

4

AAPT2 still seems to have some trouble with long paths on Windows. Try moving your gradle cache closer to C:\ to shorten the file path.

Here's an answer on how to change the cache location: How to set gradle cache location?

Izabela Orlowska
  • 7,431
  • 2
  • 20
  • 33