AAPT err(Facade for 842785731): \\?\C:\Windows\System32\config\systemprofile\.android\build-cache\13ff5f0f3117905a03d905eceda3a7f0256e88df\output\res\drawable-xxhdpi-v4\abc_list_focused_holo.9.png ERROR: Unable to open PNG file
20:10:55.877 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:20:10:55.877 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution failed for task ':app:mergeDevReleaseResources'.20:10:55.877 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Error: Some file crunching failed, see logs for details
Caused by: java.lang.RuntimeException: Some file crunching failed, see logs for details
问题:
根本是文件无法读取,
一般是 png图片改成.9后缀了,或者类似的。
但这次遇到的是 目录名称过长:(因为开启了build cache,子目录名称太长,可以换个build-cache路径,或者禁止。官网说明
https://developer.android.com/studio/build/build-cache.html)
解决办法:
1.禁止 build-cache
在项目根目录的gradle.properties加上
android.enableBuildCache
=
false
2.更改build-cache目录:
还没试。。。。