• Register
0 votes

Problem :

Currently I am using the Android Studio 2.1 but when I try to run it the suddenly my App shows me the below error Message my Gradle Build saying the following

Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:mergeDebugResources'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskEx
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExec
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.j


7 5 2
3,870 points

Please log in or register to answer this question.

2 Answers

0 votes

Solution :

I had faced the same error recently. I researched on it and found the solution on it.

In your individual apps's build.gradle, section android {}, you need to insert the below code:

aaptOptions {  
cruncherEnabled = false  

This code fixed my issue.


My problem was the crashed png image in one of the drawable folders. I mean a image like which we sometime face in our windows photo viewer. I had just dropped the image from my folder and my all problems got solved.


Actually when something goes wrong with your image file then you need to go to (drawable) and just remove image or replace it with new image. This will solve your problem.

In addition to that you can put the method in (build.gradle), This will solve the problem and good way to catch up what was wrong. Also in your build.gradle, section android {}insert (cruncherEnagle = false)apptOptions.

9 7 4
38,600 points
0 votes


In the separate apps's build.gradle, section android {}, insert :

aaptOptions {  
    cruncherEnabled = false  

Attempt running gradle from command line:

gradle clean build --debug

And post your log later.

Only inspect this link - Android Studio - mergeDebugResources exception and libpng error: Not a PNG file Error displaying In Android Studio

You can attempt this command as well sudo apt-get install lib32stdc++6 on the console in case you are performing on a linux machine, then restart android studio and run your project

For me, it was a corrupted PNG file. Go to your res folder and attempt to open every images.

Really, image file something wrong. Go to (drawable) and remove image or replace with new image.This will resolve issue.

In addition, you can place method in (build.gradle), however This will not solve the problem however good way to catch up what was wrong.

In build.gradle, section android {}, insert (cruncherEnagle = false)apptOptions

we have to add dependency

 compile 'com.google.android.gms:play-services-auth:8.3.0' 

in app-level build.gradle file however doing so and building project an error comes saying

Error:Execution failed for task ':app:processDebugGoogleServices'.
> Please fix the version conflict.


apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "com.brainbreaker.socialbuttons"
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.android.support:design:23.0.1'
    compile 'com.google.android.gms:play-services-auth:8.3.0'


10 6 4
31,120 points

Related questions

0 votes
1 answer 513 views
Problem : I am facing the gradle error at the building from few days it just came randomly. My project depends on the multiple libraries and it built without the problems until few days (even with a libraries) ... .gradle.api.internal.changedetection.state.CacheLockReleasingTaskExecuter$1.run(CacheLockReleasingTaskExecuter.java:40) at org.gradle.internal.Factories$1.create(Factories.java:26)
asked Jan 30, 2020 jwilliam 3.9k points
0 votes
1 answer 7 views
Problem: execution failed for task ':app:compiledebugjavawithjavac'
asked Feb 18 charles mathews 3.8k points
0 votes
1 answer 40 views
Problem : I am new to Android Programming. I have started working on it recently. Now I am facing below error message. Error:Execution failed for task ':app:transformClassesWithDexForDebug'. com.android.build.transform.api.TransformException: com.android.ide.common. ... have added too many Gradle dependencies, but all those dependencies are important for my project. Have anybody faced this issue?
asked Feb 28, 2020 mphil 2.3k points
1 vote
1 answer 367 views
Problem : After updating my android studio, I am facing below error. How can I fix this error?? org.gradle.execution.MultipleBuildFailures: Build completed with 1 failures. at org.gradle ... .execute(SessionFailureReportingActionExecuter.java:63) at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:53)
asked Dec 11, 2019 alecxe 7.5k points
0 votes
1 answer 14 views
Problem: re-download dependencies and sync project (requires network)
asked Feb 16 Ethan ross 1.8k points
0 votes
1 answer 69 views
Problem : I am new to Android. Recently I have installed the Android studio 3.1.3 and it started giving me the dependencies error if tried to make the new project and tried to compile for the first time. “Unable to resolve dependency for ':app@debug/compileclasspath': could not resolve project”
asked Feb 18, 2020 mphil 2.3k points
0 votes
1 answer 56 views
Problem : Recently I had preinstalled my laptop and then switched to Windows 10. Before that I had saved my project in the Android Studio 2.2.3 and then I downloaded the same version of the Android Studio after I completed the preinstallation of my laptop, but if I ... . Blockquote I had tried all of the steps mentioned by Android Studio to resolve the error but I am still facing the same issue.
asked Feb 22, 2020 mphil 2.3k points
0 votes
2 answers 92 views
Problem : I have already replaced every occurrence of a compile by implementation in the project's build.gradle, but I am still facing below warning : “Warning: configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'” I also tried to look for a "compile" in a whole project but no match was found. So what is the cause of the warning?
asked Jan 30, 2020 jwilliam 3.9k points
0 votes
1 answer 4 views
Problem: warning:unable to find optional library: org.apache.http.legacy
asked 6 days ago charles mathews 3.8k points
1 vote
1 answer 355 views
Problem : I am very beginner to Android and Firebase. I am taking help of tutorials to learn Android Programming. I am trying to add the Firebase-database to my Android application and I am facing below error: FAILURE: Build failed with an exception. ·         What went ... to get full insights. I am stuck with above Android error. Need some expert who can help me in fixing above Android error.
asked May 16, 2020 Martin K 6.6k points