编译android sdk , adt
参考:
http://androidn.wokoko.com/bbs/viewthread.php?tid=845
./android.2.3.3.r1/sdk/eclipse/README_WINDOWS.txt
前题:
1. 安装完ubuntu10.04 android编译环境
2. 下载部署eclipse特定版本
http://www.eclipse.org/downloads/packages/eclipse-rcpplug-developers/ganymedesr2
3. 安装jdk6,jdk5.将javadoc设置为java5的工具.
4. windows+Cygwin
配置项目信息
不管哪个项目,能编过就可以,
zuoqiang@ubuntu64:/media/e/android/android_2_3_3_r1$ . build/envsetup.sh
including device/htc/passion/vendorsetup.sh
including device/samsung/crespo/vendorsetup.sh
zuoqiang@ubuntu64:/media/e/android/android_2_3_3_r1$ lunch
You're building on Linux
Lunch menu... pick a combo:
1. generic-eng
2. simulator
3. full_passion-userdebug
4. full_crespo-userdebug
Which would you like? [generic-eng] 1
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.3.3
TARGET_PRODUCT=generic
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=GRI40
============================================
编译ADT
将eclipse解出来,并设置其所在位置的环境变量, 所以需要此版本可能是要支持PDE的eclipse.
解压eclipse-rcp-ganymede-SR2-linux-gtk-x86_64.tar.gz
eclipse解压位置
/home/username/bin/eclipse
username@ubuntu64:~/android_2_3_3_r1$ export ECLIPSE_HOME=/home/username/bin/eclipse
username@ubuntu64:~/android_2_3_3_r1$ echo $ECLIPSE_HOME
/home/username/bin/eclipse
开始编译
zuoqiang@ubuntu64:/media/e/android/android_2_3_3_r1$ ./sdk/eclipse/scripts/build_server.sh ./adt/ $* 2>&1 | tee -a MakeADT.log
应有结果:
...
extractFeature:
[unzip] Expanding: /media/e/android/android_2_3_3_r1/sdk/eclipse/v201207182115/com.android.ide.eclipse.adt-v201207182115.zip into /home/zuoqiang/bin/eclipse/plugins/org.eclipse.pde.build_3.4.1.R34x_v20081217/scripts/adt
buildInternalFeatures:
BUILD SUCCESSFUL
BUILD SUCCESSFUL
Total time: 59 seconds
**** Package in ./adt/
Error: Build failed to produce ./adt//android-eclipse
Aborting
zuoqiang@ubuntu64:/media/e/android/android_2_3_3_r1$
仍然有的问题: 不防隘生成adt
**** Package in ./adt/
Error: Build failed to produce ./adt//android-eclipse
Aborting
ADT 所在路经
~/android/android_2_3_3_r1/sdk/eclipse/v201207182115
编译SDK
make sdk -j2 $* 2>&1 | tee -a MakeSDK1.log
正常应得
./out/host/linux-x86/sdk/android-sdk_eng.zuoqiang_linux-x86.zip
如与sdk问题请参考"参考"的文档.