我想在jenkins上进行espresso测试。我在这里做了配置 https://www.perfectomobile.com/solutions/devtunnel/espresso-in-continuous-integration
我收到如下错误
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
任何可能错误的消化?
答案 0 :(得分:1)
这种情况正在发生,因为AAPT2在Windows上仍存在长路径问题(现在只支持最多145个字符的路径,遗憾的是)。此文件路径大约为170,因此超出了该限制。
问题应尽快解决,同时您可以将缓存目录移近C:root。
答案 1 :(得分:1)
我遇到了同样的问题。建议的解决方案here有所帮助。
只需添加环境变量GRADLE_USER_HOME
即可env GRADLE_USER_HOME= ${WORKSPACE}/gh
注意:确保gh靠近主驱动器位置