Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

aapt finished with non-zero exit value 127

Tags:

android

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?

like image 295
Donato Avatar asked Aug 07 '15 01:08

Donato


2 Answers

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
like image 78
Edwin Lee Avatar answered Sep 18 '22 12:09

Edwin Lee


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

like image 21
mangu23 Avatar answered Sep 22 '22 12:09

mangu23