7

It's the first time that I open a project in android studio, and the first error that i get is the following:

Execution failed for task ':app:mergeDebugResources'.
Error: Failed to run command:
/home/giacomotb/Programs/android-studio/sdk/build-tools/android-4.4/aapt s -i /home/giacomotb/AndroidStudioProjects/ProvaDBCinema/app/build/exploded-bundles/ComAndroidSupportAppcompatV71900.aar/res/drawable-hdpi/abc_list_selector_disabled_holo_light.9.png -o /home/giacomotb/AndroidStudioProjects/ProvaDBCinema/app/build/res/all/debug/drawable-hdpi/abc_list_selector_disabled_holo_light.9.png
**Error Code:127**
Output:
/home/giacomotb/Programs/android-studio/sdk/build-tools/android-4.4/aapt: error while loading shared libraries: **libz.so.1: cannot open shared object file: No such file or directory**

I tried to do this commands:

apt-get install lib32ncurses5 lib32stdc++6

that goes well and that one:

sudo apt-get update
sudo apt-get install ia32-libs

that says:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package ia32-libs is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  lib32z1 lib32ncurses5 lib32bz2-1.0

E: Package 'ia32-libs' has no installation candidate

I can't find other solution on the web.

what should I do?

I use ubuntu 13.10 x64

  • On Ubuntu 14.04 x64 sudo apt-get install zlib1g:i386 was necessary in addition to theczechsensation's command – user265271 Apr 4 '14 at 10:48
  • Android studio seems to require 32bit "aapt" and this question has also appeared at SO Android studio cannot find aapt. – Clayton Apr 29 '14 at 18:46
27

Use lib32z1 - worked for me (Ubuntu 13.10).

sudo apt-get install lib32z1
  • 2
    Its working :)) – Łukasz Woźniczka Aug 6 '14 at 16:38
  • 1
    worked on debian 8 jessie amd64. Thank you – Joao Polo Jan 6 '16 at 2:38
4

I had the same problem. I have installed couple packages, but this seemed to have fixed it

sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5
  • 1
    Just to note, lib32z1 lib32stdc++6 was enough for me on a Debian Jessie box. – Victor Häggqvist Aug 29 '14 at 2:52

Not the answer you're looking for? Browse other questions tagged or ask your own question.