Google Experts Says How To Install Android Development Environment On Ubuntu 9.04

<<< >>> Published on: February 9, 2010 <<< >>> Last Modified on: February 9, 2010 <<< >>>
Babitha

Author: Babitha

Try hard to get what you like or you will be forced to like what you get...

The example taken here is a Linux computer, which is currently running Ubuntu 9.04 (Jaunty Jackalope).

 

- Make sure your system is up-to-date:

sudo apt-get update && sudo apt-get upgrade

 

- Install Java

sudo apt-get install sun-java6-jdk

 

- Switch Sun to be the default version of Java. It’s much faster than the built-in version

 

sudo update-java-alternatives -s java-6-sun

 

- Make a directory, e.g. mkdir ~/android

 

- Download Eclipse from http://www.eclipse.org/downloads/ (e.g: “Eclipse Classic 3.5.1″ version). Move the code into that directory, then unpack it. Unpacking is enough–the software runs in place and doesn’t have to be installed onto the system other than unpacking it.

mv eclipse-SDK-3.5.1-linux-gtk.tar.gz ~/android
cd ~/android

tar xzvf eclipse-SDK-3.5.1-linux-gtk.tar.gz

 

- Download the latest Android SDK from http://developer.android.com/sdk/index.html and move it into that directory, then unpack it. It is believed that unpacking is enough–the software runs in place and doesn’t have to be installed onto the system other than unpacking it.

mv android-sdk_r04-linux_86.tgz ~/android/
cd ~/android/
tar xzvf android-sdk_r04-linux_86.tgz

 

- Edit your ~/.bashrc file and add a line to the bottom:

export PATH=${PATH}:/home/matt/android/android-sdk-linux_86/tools

Okay, now Java, Eclipse, and the Android SDK are installed. Now you need to install the Android Development Tools (ADT) for Eclipse.

 

- Run Eclipse. If you installed Eclipse in ~/android/eclipse then you can cd to that directory and run ./eclipse to start the program.

 

- Install the Android Development Tools (ADT) for Eclipse. Follow the excellent instructions at http://developer.android.com/sdk/eclipse-adt.html to get and install the ADT. Don’t forget the “Window > Preferences” step to tell Eclipse where the Android SDK is, so when you click “Browse…” you might navigate to /home/matt/android/android-sdk-linux_86 for example.

 

- Next, to install a bunch of packages: In Eclipse, click “Window->Android SDK and AVD Manager.” In the resulting window, on the left-hand side will be an “Available Packages” option. You need to click on that and then click the checkbox beside the “repository.xml” package to select all available packages and then click “Install Selected.”

 

- Now you’re ready to create your first Android program . You’ll discover how to make an Android virtual device (AVD) along the way.

 

- If you want, you can get custom skins, e.g. a Nexus One skin for Android. You can unpack the .zip file in <your-sdk-directory>/platforms/android-x.y/skins/nexusone for example. Then create a new Android virtual device (AVD) and select the Nexus One as the skin.

 

- If you want to run your Android program on your own Android device, you’re pretty close. Follow step 10 of this walkthrough. When you’re done and the phone is disconnected from your Ubuntu machine, you’ll still have the executable, called an “android package” or .apk file on your phone. So you can show your friends your “Hello, World!” program.

 

Some resources that are helpful (other than the official Android developer site) are below:
- http://www.futuredesktop.org/developing_android_apps_on_ubuntu.html
- http://www.softwarepassion.com/setting-up-android-development-platform-on-ubuntu-linux-904/
- http://www.howtoforge.com/installing-google-android-sdk1.0-on-ubuntu8.04-desktop
- http://androidforums.com/developer-101/2321-installing-eclipse-android-sdk-ubuntu-8-04-8-10-a.html

- You might also want to watch this O’Reilly video or some of the official videos.

Comments + Pingbacks + Trackbacks

NO COMMENT YET

Leave a response