Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programs running aapt in android sdk from shell and from sbt

I have a weird problem where I cannot run aapt from an sbt command as well as from the shell.

I run this command:

sbt update package-debug

And everything hums along until I get this error:

java.io.IOException: Cannot run program "/home/egervari/Programs/android-sdk-linux_x86/platforms/android-7/tools/aapt": java.io.IOException: error=2, No such file or directory

So I try running it manually, just for the heck of it:

egervari@ken:~/Programs/android-sdk-linux_x86/platforms/android-7/tools$ ./aapt
bash: ./aapt: No such file or directory

This is pretty weird because it's right there:

egervari@ken:~/Programs/android-sdk-linux_x86/platforms/android-7/tools$ ls -la
total 4660
drwxr-xr-x 3 egervari egervari    4096 2010-10-16 09:13 .
drwxr-xr-x 8 egervari egervari    4096 2010-10-16 09:13 ..
-rwxrwxrwx 1 egervari egervari 3472673 2010-10-16 09:13 aapt
-rwxrwxrwx 1 egervari egervari 1050328 2010-10-16 09:13 aidl
-rwxrwxrwx 1 egervari egervari  213690 2010-10-16 09:13 dexdump
-rwxrwxrwx 1 egervari egervari    2497 2010-10-16 09:13 dx
drwxr-xr-x 2 egervari egervari    4096 2010-10-16 09:13 lib
-rw-r--r-- 1 egervari egervari   10800 2010-10-16 09:13 NOTICE.txt
egervari@ken:~/Programs/android-sdk-linux_x86/platforms/android-7/tools$

Help? :/

like image 336
egervari Avatar asked Oct 16 '10 14:10

egervari


2 Answers

It looks like you're trying to run a 32-bit binary on a 64-bit OS. Maybe you're missing the required shared libraries. Try running file aapt and ldd ./aapt to see what it says.

If this is the case then installing ia32-libs could fix it, as there are no 64-bit binaries available.

sudo apt-get install ia32-libs
like image 79
richq Avatar answered Oct 13 '22 00:10

richq


ia32-libs is deprecated.

The following worked for me:

apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0

I was still getting error when running aapt, so I installed this:

apt-get install lib32stdc++6

works perfect now.

like image 20
mick88 Avatar answered Oct 12 '22 22:10

mick88