user3388384
user3388384

Reputation: 233

Jenkins mergeDebugResources FAILED - no access to files

I would like to run espresso tests on jenkins. I did configuration like here https://www.perfectomobile.com/solutions/devtunnel/espresso-in-continuous-integration

I got error like below

C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-1\files-
1.1\design-26.1.0.aar\a1a21cd8aba52bd546711d26a970dfcb\res\drawable-
v21\avd_hide_password.xml: error: file not found.


Error: java.util.concurrent.ExecutionException: 
com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
:app:mergeDebugResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Error: java.util.concurrent.ExecutionException: 
com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --
debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 9s
10 actionable tasks: 9 executed, 1 up-to-date
Build step 'Invoke Gradle script' changed build result to FAILURE
Build step 'Invoke Gradle script' marked build as failure
Finished: FAILURE

Any sugestions what can be wrong?

Upvotes: 2

Views: 640

Answers (2)

xrnd
xrnd

Reputation: 1342

I faced the same issue. The solution proposed here helped.

Simply add enviornmental variable GRADLE_USER_HOME

env GRADLE_USER_HOME= ${WORKSPACE}/gh

Note: Make sure gh is close to the main drive location

Upvotes: 1

Izabela Orlowska
Izabela Orlowska

Reputation: 7532

This is happening because AAPT2 still has issues with long paths on windows (only supports paths up to 145 characters or so for now, sadly). This file path is around 170, so it's over that limit.
The issue should be fixed soon, in the meantime you can move your cache directory closer to the C: root.

Upvotes: 1

Related Questions