Part (A) You need to add the debian package source and install the compiling tools and JDK from Sun in eee pc Linux
(1) Launch Terminal (Ctrl-Alt-T)
(2) edit the file/etc/apt/sources.list
sudo vi /etc/apt/sources.listand add this line to the end of the file "sources.list"
deb http://http.us.debian.org/debian/ stable main(3) Run these commands in Terminal to install building tools
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential ant (4) Download JDK from Sun
(Latest Release)
http://java.sun.com/javase/downloads/index.jsp
The current version of JDK is
Java SE Development Kit 6u7
Download the Linux version and the file without rpm. That is
jdk-6u7-linux-i586.bin
(5) Run these commands in Terminal to install JDK
chmod +x jdk-6u7-linux-i586.bin
./jdk-6u7-linux-i586.bin
#then follow the install instructions and answer yes and then a directory jdk1.6.0_07 will be created
sudo mv jdk1.6.0_07 /usr/
cd /usr/bin
sudo ln -sf /usr/jdk1.6.0_07/bin/java
sudo ln -sf /usr/jdk1.6.0_07/bin/javac
sudo ln -sf /usr/jdk1.6.0_07/bin/jar
Part (B) Download and Install Android SDK
(1) Download the Android SDK
http://code.google.com/android/download.html
download the Linux version, the current version is
Linux (i386) android-sdk-linux_x86-1.0_r1.zip
(2) unzip and install the android SDK say to /usr/
unzip android-sdk-linux_x86-1.0_r1.zip
sudo mv android-sdk-linux_x86-1.0_r1 /usr/(3) edit ~/.bash_profile
vi ~/.bash_profilechange
PATH=~/bin:"${PATH}"to
PATH=~/bin:/usr/android-sdk-linux_x86-1.0_r1/tools:"${PATH}"(4) Test run Android emulator
starting emulator in portrait mode will be out of view in eeepc, so we need to run it in landscape mode. Moreover the sound does not work.
To start the emuator for the first time, use these commands in Terminal
Assume, Android SDK is installed in /usr and android data will be kept at ~/androiddata
export PATH=${PATH}:/usr/android-sdk-linux_x86-1.0_r1/tools
mkdir -p ~/androiddata
emulator -datadir ~/androiddata -noaudio -skin HVGA-L
or, alternatively, if you have to run the emulator in portrait mode, you need to scale it say by 0.6
emulator -datadir ~/androiddata -noaudio -scale 0.6
Please be patient for the Emulator for the first time as it takes very long to create the data on first installation
Part (C) Test building HelloActivity from the sample code
(1) If you have installed the Andriod SDK and started the emulator for the first time, it is better to reboot the computer first and then start the emulator again.
(2) Create the Projects directory say
mkdir -p ~/Projects(3) start emulator in Terminal
emulator -noaudio -skin HVGA-L &(4) copy the HelloActivity from sample of SDK to Projects directory
cp -r /usr/android-sdk-linux_x86-1.0_r1/samples/HelloActivity ~/Projects/(5) Use activityCreator to create the build file
activitycreator --out ~/Projects/HelloActivity com.example.android.helloactivity(6) Build the HelloActivity project
cd ~/Projects/
ant(7) Install the HelloActivity project to emulator
cd ~/Projects/
ant installRemember, you must start the emulator before installing binary
(8) Then you can test the installed program HelloActivity in the emulator
To uninstall the program do this in Terminal
cd ~/Projects/
ant uninstallIf you need an integrated development environment, use Eclipse and install the plug-ins as described in the Android download site.
If you amend some codes in the Project and want to reinstall use
cd ~/Projects/
ant reinstall
For Mac OS X installation, just skip the Part (A) of this guide and follow similar procedure in other parts, as Mac OS X has these building tools / JDK already installed.
For other sample projects from SDK the activityCreate scripts are
cp -r /usr/android-sdk-linux_x86-1.0_r1/samples/LunarLander ~/Projects/
activitycreator --out ~/Projects/LunarLander com.example.android.lunarlander
cd ~/Projects/LunarLander
ant install
cp -r /usr/android-sdk-linux_x86-1.0_r1/samples/NotePad ~/Projects/
activitycreator --out ~/Projects/NotePad com.example.android.notepad
cd ~/Projects/NotePad
ant install
cp -r /usr/android-sdk-linux_x86-1.0_r1/samples/Snake ~/Projects/
activitycreator --out ~/Projects/Snake com.example.android.snake
cd ~/Projects/Snake
ant installEnjoy.



