Apat is absent, but its there

I had to reinstall ubuntu-14.04-64 for reasons.

After this reinstallation, when I try to create my android projects, I get a bunch of these lines (among other things) in the output:

java.io.IOException: Cannot run program "/home/gps/Android/Sdk/build-tools/23.0.2/aapt": error=2, No such file or directory 

Now I know that this file exists in my setup because it is:

 gps@gps-HP-ProBook-4540s :~$ ls -l /home/gps/Android/Sdk/build-tools/23.0.2/aapt -rwxrwxr-x 1 gps gps 1146608 Jan 4 18:47 /home/gps/Android/Sdk/build-tools/23.0.2/aapt gps@gps-HP-ProBook-4540s :~$ file /home/gps/Android/Sdk/build-tools/23.0.2/aapt /home/gps/Android/Sdk/build-tools/23.0.2/aapt: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=fc8aded5418584519d59f2133e81184fe3d4bdfd, not stripped gps@gps-HP-ProBook-4540s :~$ 

I installed all sdk tools from v19 onwards. Changing the project settings for any of them shows the same error.

Also, trying to execute the file directly gives the same error:

 gps@gps-HP-ProBook-4540s :~$ /home/gps/Android/Sdk/build-tools/23.0.2/aapt bash: /home/gps/Android/Sdk/build-tools/23.0.2/aapt: No such file or directory 

Can anyone suggest a solution to this problem?

+5
source share
3 answers

You are probably missing the dynamic link library the program needs. Run this command to view the libraries that it uses and install the ones that are missing:

 ldd /home/gps/Android/Sdk/build-tools/23.0.2/aapt 
+4
source

The problem is solved as follows:

In this case, there were no 32-bit libraries, libc and zlib. Installed using the following parameters:

 sudo apt-get install libc6:i386 sudo apt-get install zlib1g-dev:i386 

Thanks to @Joni for the clear directions.

+5
source

Solution with Ubuntu 16.04 / 16.10 to enable 32-bit binaries to run on a 64-bit host

 sudo dpkg --add-architecture i386 sudo apt-get -qqy update sudo apt-get -qqy install libncurses5:i386 libstdc++6:i386 zlib1g:i386 
+3
source

Source: https://habr.com/ru/post/1243814/


All Articles