ubuntu 12.04 android sdk fun

Jenkins says:
[INFO] /bin/sh: 1: /home/jenkins/opt/sdk/android-sdk/platform-tools/aapt: not found
[ERROR] Error when generating sources.
org.apache.maven.plugin.MojoExecutionException:

Ehm.. ok.

cd /home/jenkins/opt/sdk/android-sdk/platform-tools/
root@javaone:/home/jenkins/opt/sdk/android-sdk/platform-tools# ls -al
total 23204
drwxrwxr-x 5 jenkins jenkins 4096 Jul 4 13:39 .
drwxr-x--- 12 jenkins jenkins 4096 Jul 4 13:41 ..
-rw-rw-r-- 1 jenkins jenkins 401602 Jul 4 13:39 NOTICE.txt
-rwxrwxr-x 1 jenkins jenkins 929144 Jul 4 13:39 aapt
-rwxrwxr-x 1 jenkins jenkins 204436 Jul 4 13:39 adb
-rwxrwxr-x 1 jenkins jenkins 226004 Jul 4 13:39 aidl
(...)
root@javaone:/home/jenkins/opt/sdk/android-sdk/platform-tools# ./aapt
bash: ./aapt: No such file or directory
root@javaone:/home/jenkins/opt/sdk/android-sdk/platform-tools#

Ok, now WTF?!

root@javaone:/home/jenkins/opt/sdk/android-sdk/platform-tools# file aapt
aapt: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, stripped

Gotcha! 32bit. ia32-libs does this, right?

root@javaone:~# apt-get install ia32-libs
Some packages could not be installed. (...)

The following packages have unmet dependencies:
 ia32-libs : Depends: ia32-libs-multiarch
E: Unable to correct problems, you have held broken packages.

Oh no, you don't!

root@javaone:~# apt-get install ia32-libs-multiarch
Some packages could not be installed. (..)
The following packages have unmet dependencies:
 ia32-libs-multiarch:i386 : Depends: libgphoto2-2:i386 but it is not going to be installed
 Depends: libsane:i386 but it is not going to be installed
 E: Unable to correct problems, you have held broken packages.
 root@javaone:~# apt-get install libgphoto2-2:i386 libsane:i386

 Some packages could not be installed. (..)

The following packages have unmet dependencies:
 libgphoto2-2:i386 : Depends: libgd2-xpm:i386 (>= 2.0.36~rc1~dfsg) but it is not going to be installed
 E: Unable to correct problems, you have held broken packages.
 root@javaone:~# apt-get install libgd2-xpm:i386

 The following extra packages will be installed:
 gcc-4.6-base:i386 libc6:i386 libexpat1:i386 libfontconfig1:i386 libfreetype6:i386 libgcc1:i386 libgd2-xpm libjpeg-turbo8:i386 libjpeg8:i386 libpng12-0:i386 libx11-6:i386 libxau6:i386 libxcb1:i386
 libxdmcp6:i386 libxpm4:i386 zlib1g:i386
 Suggested packages:
 glibc-doc:i386 locales:i386 libgd-tools libgd-tools:i386
 The following NEW packages will be installed:
 gcc-4.6-base:i386 libc6:i386 libexpat1:i386 libfontconfig1:i386 libfreetype6:i386 libgcc1:i386 libgd2-xpm libgd2-xpm:i386 libjpeg-turbo8:i386 libjpeg8:i386 libpng12-0:i386 libx11-6:i386
 libxau6:i386 libxcb1:i386 libxdmcp6:i386 libxpm4:i386 zlib1g:i386
 0 upgraded, 17 newly installed, 3 to remove and 3 not upgraded.

Ok, a few minutes later I could do a:

apt-get --no-install-recommends install ia32-libs-multiarch

And..

root@javaone:/home/jenkins/opt/sdk/android-sdk/platform-tools# ./aapt
<pre><pre>Android Asset Packaging Tool

Usage:
 aapt l[ist] [-v] [-a] file.{zip,jar,apk}
 List contents of Zip-compatible archive.

It works. Let's make a chef out of it and be happy 🙂

Author: ags

bio

1 thought on “ubuntu 12.04 android sdk fun”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.