Donato
Donato

Reputation: 2777

aapt finished with non-zero exit value 127

For 2 days, I have been trying to get a blank android activity to compile on intellij idea ultimate on Ubuntu 14.04 64-bit. This error has really stumped me:

Error:Gradle: Execution failed for task ':app:mergeDebugResources'.
> /home/guarddog/Documents/github/IcsTrac/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.2.1/res/drawable-ldrtl-hdpi/abc_ic_ab_back_mtrl_am_alpha.png: Error: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/local/android-sdk-linux/build-tools/22.0.1/aapt'' finished with non-zero exit value 127

Note I have Java 8, Gradle 2.5 and /usr/local/android-sdk-linux/tools all in my $PATH.

I tried the advice here: Gradle build failed in Android Studio. But the error still occurs. How can I resolve this issue?

Upvotes: 7

Views: 11109

Answers (3)

Edwin Lee
Edwin Lee

Reputation: 159

I meet the similar issue. I install lib32z1 and problem solved. Hope it could help.

Thanks @agustin.aliaga's answer in:

finished with non zero exit value

In my case, I had to install libz.so.1 library to make it work, on Ubuntu 15.04 with this command:

sudo apt-get install lib32z1

Later, I make a deep survey and found to support 32bit Android platform in ubuntu 64 os, one should install the 32bit library.

sudo apt-get install lib32z1 lib32ncurses5 lib32stdc++6

Upvotes: 4

mangu23
mangu23

Reputation: 880

I usually just do Build> Rebuild Project or Clean Project

if that doesn't work then I go File> Invalidate/Caches Restart and choose Invalidate and Restart

Upvotes: 2

piotrek1543
piotrek1543

Reputation: 19361

Close Android Studio, delete build folders from your project location, than open AS and choose rebuild option.

Hope it help. Let me know if you still have that problem.

EDIT: Please, check also this issue: finished with non zero exit value

Upvotes: 1

Related Questions