11

Error:Execution failed for task ':app:processDebugResources'.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/home/mobi27/opt/AND-Studio/Android/Sdk/build-tools/22.0.1/aapt'' finished with non-zero exit value 1

akshay
  • 5,811
  • 5
  • 39
  • 58

9 Answers9

8

My solution is: Menu Build -> Clean Project.

I deleted and pasted a picture a while before. The picture has the same problem, so something wrong happened.

spikeyang
  • 691
  • 9
  • 17
4

In my case I tried to change buildToolsVersion in gradle, but it didn't help me. My problem was fixed when I found drawable which called example.PNG. It should be example.png;

AinisSK
  • 306
  • 1
  • 10
  • For me it was with some weird symbols in the name of the image file before .jpeg. Once renamed, it fixed my problem. – Kumar Apr 07 '16 at 04:06
2

I forgot to install the 32bit dependencies:

sudo apt-get install -y lib32gcc1 libc6-i386 lib32z1 lib32stdc++6 sudo apt-get install -y lib32ncurses5 lib32gomp1 lib32z1-dev lib32bz2-dev

dirkk0
  • 2,460
  • 28
  • 34
2

Check if you added a resource that violates the conventions. E.g. cannot have capital letters and such.

In my case I got the error as I had modified a drawable resource and Photoshop saved the image with capital filetype (file_name.PNG). Changing the filename to lower-case and rebuilding the project solved the problem.

Paamand
  • 626
  • 1
  • 6
  • 17
1

It appears you're missing the 22.0.1 build tools. Try going to the Tools>Android>SDK Manager and seeing what version of 'Android SDK Build-tools' you have installed. If it isn't already installed or needs an update, put a checkmark next to the 22.0.1 tools and click install.

  • I am also getting a similar error: Error:Execution failed for task ':app:processDebugResources'. > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\C\AppData\Local\Android\sdk\build-tools\22.0.1\aapt.exe'' finished with non-zero exit value 1. I have updated to 22.0.1. The activity file where the error occurs highlights the symbol 'R' which it cannot resolve. – Carlos Taylor Aug 09 '15 at 04:25
0

go to Android SDK Manager--->Tool---->check the Android SDK Buil-tolls you have installed, -------------->go to your module's build.gradle--->fill the right "buildToolsVersion"

0

In my case I have this line in attrs.xml (values folder):

<flag name="default" value="0" />

default - is reserved word, so I renamed it and fixed it!

<flag name="font_default" value="0" />
walkmn
  • 2,322
  • 22
  • 29
0

You just need to update the build tool version inside app/build.gradle

buildToolsVersion "26.0.0"

Now Clean Project and go ahead.

Zafar Imam
  • 319
  • 3
  • 11
0

Just a f*king Invalidate Caches & restart did the trick for me

Vasile Doe
  • 1,674
  • 1
  • 24
  • 40