Jenkins Gradle 应用程序:mergeDebugResources 无法打开 PNG 文件 [英] Jenkins Gradle app:mergeDebugResources Unable to open PNG file

查看:18
本文介绍了Jenkins Gradle 应用程序:mergeDebugResources 无法打开 PNG 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以从 Android Studio 和 cmd 构建 gradle.但是这个问题只会在 Jenkins 构建时出现.这个问题不是出现在 Mac Jenkins 设置中,而是出现在我的 Windows 设置中.

I am able gradle build from Android Studio and cmd. But this issue is only coming in Jenkins while building. This issue didn't come in Mac Jenkins setup, but is coming in my Windows setup.

以下是我的 gradle 设置.

Below is my gradle setting.

:app:mergeBetaDebugResources

:app:mergeBetaDebugResources

AAPT: \?C:WindowsSystem32configsystemprofile.androiduild-cache671e94b2d47b0ef7a24e43f8814a29b911cc4872output
esdrawable-ldrtl-mdpiabc_ic_ab_back_mtrl_am_alpha.png ERROR: Unable to open PNG file
AAPT: \?C:WindowsSystem32configsystemprofile.androiduild-cache7dc509eb0db17265925a5800b67445547ef97697output
esdrawable-hdpicommon_google_signin_btn_text_dark_disabled.9.png ERROR: Unable to open PNG file
AAPT: \?C:WindowsSystem32configsystemprofile.androiduild-cache671e94b2d47b0ef7a24e43f8814a29b911cc4872output
esdrawable-ldrtl-xxxhdpiabc_ic_menu_copy_mtrl_am_alpha.png ERROR: Unable to open PNG file
Error: Some file crunching failed, see logs for details
:app:mergeBetaDebugResources FAILED

推荐答案

这个错误是因为 build-cache 的新特性.它使用默认的构建缓存文件夹,这是一个很长的路径.您可以通过向 gradle.properties 添加 android.enableBuildCache=false 或设置构建缓存路径来禁用构建缓存.请参阅 https://developer.android.com/studio/build/build-cache.html

This error is because of the new feature of build-cache. It is using the default build-cache folder which is a long path. You can disable build-cache by adding android.enableBuildCache=false to you gradle.properties or set the build-cache path. See https://developer.android.com/studio/build/build-cache.html

这篇关于Jenkins Gradle 应用程序:mergeDebugResources 无法打开 PNG 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆