当前位置:  开发笔记 > Android > 正文

为什么我在将可绘制文件重命名为.9.png之后得到一些文件处理失败?

如何解决《为什么我在将可绘制文件重命名为.9.png之后得到一些文件处理失败?》经验,为你挑选了1个好方法。

我正在测试9补丁图像.
在一切正常之前,我将drawable文件重命名ic_button_beat_box_default.pngic_button_beat_box_default.9.png,然后我得到错误:

某些文件崩溃失败,请参阅日志以获取详细信息

.然后我重新命名,它正常工作.那怎么会这样呢?

完整的错误是:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Some file crunching failed, see logs for details

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

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:mergeDebugResources'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
    at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
    ...
Caused by: java.lang.RuntimeException: Some file crunching failed, see logs for details
    at com.android.builder.png.QueuedCruncher.waitForAll(QueuedCruncher.java:260)
    at com.android.builder.png.QueuedCruncher.end(QueuedCruncher.java:280)
    at com.android.ide.common.res2.MergedResourceWriter.end(MergedResourceWriter.java:132)
    at com.android.ide.common.res2.DataMerger.mergeData(DataMerger.java:291)
    at com.android.ide.common.res2.ResourceMerger.mergeData(ResourceMerger.java:48)
    at com.android.build.gradle.tasks.MergeResources.doIncrementalTaskAction(MergeResources.java:250)
    at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.java:124)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.doExecute(AnnotationProcessingTaskFactory.java:244)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:220)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.execute(AnnotationProcessingTaskFactory.java:231)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:209)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
    ... 57 more

tomalf2.. 39

在Windows上我有一个"BUILD FAILED Failed to crunch file [path]"错误并通过关闭Android Studio项目解决了这个问题,将整个项目文件夹复制到一个具有较短目录路径的位置,例如我的C:文件夹然后打开该项目位于新的位置.希望能帮助到你



1> tomalf2..:

在Windows上我有一个"BUILD FAILED Failed to crunch file [path]"错误并通过关闭Android Studio项目解决了这个问题,将整个项目文件夹复制到一个具有较短目录路径的位置,例如我的C:文件夹然后打开该项目位于新的位置.希望能帮助到你

推荐阅读
yzh148448
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有