vishesh268
vishesh268

Reputation: 123

Error: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException:

This is the output of my gradle console please help me out to solve this error, I am unable to build my project

Information:Gradle tasks [:facebook:generateDebugSources, :facebook:mockableAndroidJar, :facebook:prepareDebugUnitTestDependencies, :facebook:generateDebugAndroidTestSources, :lagaiKhai:generateDebugSources, :lagaiKhai:mockableAndroidJar, :lagaiKhai:prepareDebugUnitTestDependencies, :lagaiKhai:generateDebugAndroidTestSources]
Error:java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException:
Error:Execution failed for task ':lagaiKhai:mergeDebugResources'.
> Error: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: 
Information:BUILD FAILED
Information:Total time: 23.24 secs
Information:2 errors
Information:0 warnings
Information:See complete output in console

Upvotes: 11

Views: 37002

Answers (7)

Mrinmoy
Mrinmoy

Reputation: 1368

I once accidently added .gif file in drawable folder, and faced this issue, if you find any unwanted file in drawable folder.

Follow the following steps:-

  • Remove all such files which are not recognised by drawable foalder (.gif, 9-patch, etc).
  • Close android studio and start it again
  • Clean and build project again

You are good to go again!

Upvotes: 31

Sackurise
Sackurise

Reputation: 2814

The problem is due to the .9 patch image file which you have added in the drawable.

To fix the issue.

1) Check you have named the 9 patch image as(file_name.png to file_name.9.png). E.g: "myimage.9.png" in the drawable folder.

2) Must Ensure that the 9 patch image file contains the "Content Marker on the 4 sides of the image". (i.e: if you open the image in Android studio, you will able to view 4 black lines on 4 sides of the image.)

3) if you not able to view the Content Marker on the sides of the image, then kindly rename the image file from (file_name.9.png to file_name.png), the error will be vanished.

Upvotes: 0

Mirza715
Mirza715

Reputation: 420

A temporary solution is to place the code below in the module build.gradle:

android { 
    aaptOptions.cruncherEnabled = false
    aaptOptions.useNewCruncher = false
}

And Sync the Project.Works for me.`

Upvotes: 12

ir2pid
ir2pid

Reputation: 6126

most of the time is a corrupt PNG image added recently to the project which cause this error. Check the git log and replace the file.

Sometimes menu : File > InvalidateCaches/Restart also helps

Upvotes: 0

Ulisses Curti
Ulisses Curti

Reputation: 61

I created a 9-Patch file according to https://developer.android.com/studio/write/draw9patch.html, as a result of that, I faced the same error.

I had drew just the parts I wanted to stretch, but not the entire line.

To fix it I drew the entire right and bottom lines of the 9-patch, and the parts I wanted to stretch I did it on the left and top lines.

Upvotes: 2

Rahul
Rahul

Reputation: 337

I used the Invalidate Cache and Restart Invalidate Cache and Restart option in android studio and it worked for me.

Invalidate Cache and Restart

Upvotes: 1

Moxor
Moxor

Reputation: 1888

Try checking all the recentenly added 9patch files. they all must have the content markers on the 4 sides of the image

Upvotes: 5

Related Questions