Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error:Execution failed for task ':ProjectName:mergeDebugResources'. > Crunching Cruncher *some file* failed, see logs

I have this error when trying to make a module of a project

apply plugin: 'com.android.library'  android {     compileSdkVersion 17     buildToolsVersion "19.1.0"      defaultConfig {         minSdkVersion 8         targetSdkVersion 8     }      buildTypes {         release {             minifyEnabled false             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'         }     } }  dependencies {     compile files('libs/sdk.jar')     compile files('libs/ads-lib.jar')     compile project(':google-play-services_lib')     compile files('libs/hdvdecoderandroid.jar') } 

How can i fix this error?

Edit

Here is my logs file, when i try to build it in command line

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':hDVietAndroid:m ergeDebugResources'.         at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAct ions(ExecuteActionsTaskExecuter.java:69)         at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(Ex ecuteActionsTaskExecuter.java:46)         at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.exe cute(PostExecutionAnalysisTaskExecuter.java:35)         at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(Skip UpToDateTaskExecuter.java:64)         at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(Valida tingTaskExecuter.java:58)         at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.exec ute(SkipEmptySourceFilesTaskExecuter.java:42)         at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute (SkipTaskWithNoActionsExecuter.java:52)         at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOn lyIfTaskExecuter.java:53)         at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute (ExecuteAtMostOnceTaskExecuter.java:43)         at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(Abstra ctTask.java:305)         at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.ex ecuteTask(AbstractTaskPlanExecutor.java:79)         at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.pr ocessTask(AbstractTaskPlanExecutor.java:63)         at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.ru n(AbstractTaskPlanExecutor.java:51)         at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPla nExecutor.java:23)         at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGr aphExecuter.java:88)         at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutio nAction.java:29)         at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:6 2)         at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.jav a:23)         at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java :68)         at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionA ction.java:32)         at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:6 2)         at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:5 5)         at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLa uncher.java:149)         at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher .java:106)         at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.jav a:86)         at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController. run(InProcessBuildActionExecuter.java:80)         at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)         at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)         at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildA ctionExecuter.java:36)         at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildA ctionExecuter.java:26)         at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:51)         at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)         at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute( CommandLineActionFactory.java:237)         at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute( CommandLineActionFactory.java:210)         at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValida tionAction.java:35)         at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValida tionAction.java:24)         at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandL ineActionFactory.java:206)         at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandL ineActionFactory.java:169)         at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAc tion.java:33)         at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAc tion.java:22)         at org.gradle.launcher.Main.doAction(Main.java:33)         at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)         at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.jav a:54)         at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)         at org.gradle.launcher.GradleMain.main(GradleMain.java:23)         at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:33)         at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:130)         at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48) Caused by: java.lang.RuntimeException: Crunching Cruncher vertbar.9.png failed, see logs          at com.android.builder.png.QueuedCruncher.waitForAll(QueuedCruncher.java:178)         at com.android.builder.png.QueuedCruncher.end(QueuedCruncher.java:190)         at com.android.ide.common.res2.MergedResourceWriter.end(MergedResourceWriter.jav a:128)         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.doFullTaskAction(MergeResources .groovy:112)         at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(Incrementa lTask.groovy:70)         at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)         at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$I ncrementalTaskAction.doExecute(AnnotationProcessingTaskFactory.java:235)         at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$S tandardTaskAction.execute(AnnotationProcessingTaskFactory.java:211)         at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$I ncrementalTaskAction.execute(AnnotationProcessingTaskFactory.java:222)         at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$S tandardTaskAction.execute(AnnotationProcessingTaskFactory.java:200)         at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAct ion(ExecuteActionsTaskExecuter.java:80)         at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAct ions(ExecuteActionsTaskExecuter.java:61)         ... 47 more 

I try to search in stackoverflow, but i can't find a correct answer for my case.

like image 421
mr.icetea Avatar asked Mar 13 '15 06:03

mr.icetea


2 Answers

As stated here this can happen when using the Gradle Tools v1.1.0. After updating to v1.1.3, this has not happened anymore.

like image 86
Niklas Avatar answered Oct 09 '22 00:10

Niklas


Close android studio and open it again. Then try compiling the same code. I was getting the same error and it worked for me. Hope it helps.

like image 20
Tejas Pawar Avatar answered Oct 09 '22 01:10

Tejas Pawar