【发布时间】:2017-09-26 06:12:27
【问题描述】:
我可以从 Android Studio 和 cmd 进行 gradle 构建。但是这个问题只在构建时出现在 Jenkins 中。这个问题没有出现在 Mac Jenkins 设置中,而是出现在我的 Windows 设置中。
以下是我的 gradle 设置。
:app:mergeBetaDebugResources
AAPT: \\?\C:\Windows\System32\config\systemprofile\.android\build-cache\671e94b2d47b0ef7a24e43f8814a29b911cc4872\output\res\drawable-ldrtl-mdpi\abc_ic_ab_back_mtrl_am_alpha.png ERROR: Unable to open PNG file
AAPT: \\?\C:\Windows\System32\config\systemprofile\.android\build-cache\7dc509eb0db17265925a5800b67445547ef97697\output\res\drawable-hdpi\common_google_signin_btn_text_dark_disabled.9.png ERROR: Unable to open PNG file
AAPT: \\?\C:\Windows\System32\config\systemprofile\.android\build-cache\671e94b2d47b0ef7a24e43f8814a29b911cc4872\output\res\drawable-ldrtl-xxxhdpi\abc_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
【问题讨论】:
-
您的问题 ID 是否已修复?禁用缓存时我仍然遇到同样的错误。
-
是的。 Ygor的回答确实帮助了我。在你的 gradle.properties 中添加 android.enableBuildCache=false
-
我在 Team City 构建中遇到了同样的问题。 Ygor 接受的答案起到了作用。