UbuntuでAndroid SDKをビルド

環境: Ubuntu Server 12.04
1. ソースコードを取得

2. ビルドに必要なライブラリをインストール

$ sudo apt-get install git-core gnupg sun-java6-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev

3. SDKをビルド

$ make sdk
error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory



Interesting, it looks like the assembler program needs libz on the host system.

The issue is probably that the toolchain binaries are 32-bit and you are on a 64-bit system. In this case, you would need to install the 32-bit libz libraries to make the toolchain binaries work. Try the following:

  sudo apt-get install lib32z1

This should normally fix the problem for you. Fact is that this library is a requirement on nearly all our machines here (to build the Android platform sources), so it's probably why this didn't get detected.


$ sudo apt-get install lib32z1
$ make sdk