android build

Adding build.xml to an existing project

build by CLI

android update project --path .

After build the whole Android project.

If you install sun-java6-jdk and ‘make sdk’ you will meet above error.
You should uninstall sun-java6-jdk, sun-java6-jre, and sun-java6-bin and install sun-java5-jdk.

sudo apt-get purge sun-java6-jdk
sudo apt-get purge sun-java6-jre
sudo apt-get purge sun-java6-jbin

sudo apt-get install sun-java5-jdk
sudo apt-get install sun-java5-jre
sudo apt-get install sun-java5-jbin

cd ~/bin/myandroid/
make sdk

(need 670MB and 16 minutes)

[Check if success]

cd ~/bin/mydroid/out/host/YOUR_OS/sdk/
YOUR_OS=your operating system e.g. linux-x86.

If success, sdk folder should be in this folder.

start emulator

first:

$ . ./build/envsetup.sh
$ choosecombo
./out/host/darwin-x86/bin/emulator -system ./out/target/product/generic
-kernel ./prebuilt/android-arm/kernel/kernel-qemu -skindir
./development/emulator/skins -skin HVGA

$./out/host/linux-x86/bin/emulator

second:

$ cd ~android/out/host/linux-x86/sdk/android-sdk_eng.command_linux-x86/tools/
$./android vm --target 1 --name myconfig --skin HVGA --sdcard mysdcard
$ cd ~/android/out/host/linux-x86/sdk/android-sdk_eng.command_linux-x86/platforms/android-1.5/images
$ emulator -image system.img -initdata userdata.img -ramdisk ramdisk.img

學會編譯 Android platform 與 simulator:
http://source.android.com/source/downloading.html
trace 系統內建應用程式與 library 的 source code.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License