1. Create Ubuntu 10.04 amd64 OS and setup the environment for Android2.3.
Please follow the latest “Get Android Source Code” page (http://source.android.com/source/download.html).
Note: The space before “lucid partner” in below line cannot be ignored:
sudo add-apt-repository “deb http://archive.canonical.com/ lucid partner”
2. Update SDK to Android 2.3 (eclipse-java-galileo-SR2-win32)
1). Help -> Check for Updates. Update ADT and other tools to 8.0.1
2). Window -> Android SDK and AVD Manager. Get below packages:
Android SDK Tools, revision 8
Android SDK Platform-tools, revision 1
Documentation for Android ADK, API9, revision 1
SDK Platform Android 2.3, API 9, revision 1
Samples for SDK API 9, revision 1
NOTE: In my first try of Android-2.3_r1, the build can be worked around on a Ubuntu 08.04 32-bit OS with below issue fix:
“Only 64-bit build environments are supported beyond froyo/2.2.” issue:
http://groups.google.com/group/android-platform/browse_thread/thread/b0bb991131589363
A summary for the solution (Tested on Ubuntu 8.04 32-bit):
1). Transfer to JDK 1.6
$ update-java-alternatives -l
java-1.5.0-sun 53 /usr/lib/jvm/java-1.5.0-sun
java-6-sun 63 /usr/lib/jvm/java-6-sun
/* If java-6-sun is not listed in the output: */
$ sudo apt-get install sun-java6-jdk
/* Set the system to use the right version of java by default: */
$ sudo update-java-alternatives -s java-6-sun
2) Modify ./build/core/main.mk, comment below line and insert a new one as follows:
# ifneq (64,$(findstring 64,$(build_arch)))
ifneq (i686,$(findstring i686,$(build_arch)))
[NOTE]: Please run below command to get the right architecture that you are using:
$ uname -m
i686
3). Comment lines as follows:
# LOCAL_CFLAGS += -m64
# LOCAL_LDFLAGS += -m64
in files:
./external/clearsilver/cgi/Android.mk
./external/clearsilver/java-jni/Android.mk
./external/clearsilver/util/Android.mk
./external/clearsilver/cs/Android.mk
or change 64 to 32.
When I synced to Android-2.3.3_r1, a new issue, “GLIBC_2.11 not found”, arose. To break away from such weird things, I finally decide to upgrade to Ubuntu 10.04 amd64 as Google suggested. That takes less time than I expected. And the build runs smoothly without above issues.