我正在测试9补丁图像.
在一切正常之前,我将drawable
文件重命名ic_button_beat_box_default.png
为ic_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:文件夹然后打开该项目位于新的位置.希望能帮助到你
在Windows上我有一个"BUILD FAILED Failed to crunch file [path]"错误并通过关闭Android Studio项目解决了这个问题,将整个项目文件夹复制到一个具有较短目录路径的位置,例如我的C:文件夹然后打开该项目位于新的位置.希望能帮助到你