• Register
0 votes
769 views

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.
java:69)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46
)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskEx
ecuter.java:35)
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
uter.java:52)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.j
ava:52)

 

7 5 2
3,870 points

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.

OR

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.

OR

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

Solution:

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.

build.gradle(Module:app)

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 411 views
411 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 jwilliam 3.9k points
0 votes
1 answer 27 views
27 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 mphil 2.3k points
1 vote
1 answer 306 views
306 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 28 views
28 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 mphil 2.3k points
0 votes
1 answer 50 views
50 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 mphil 2.3k points