Sunday, April 17, 2011

Android programming getting started using Eclipse and MacOS X (64bits Installation)

A) Download and Install Eclipse

- The very first thing is of course play a visit to Android Developer website...
http://developer.android.com/index.html

- Download Eclipse 3.5 (Eclipse IDE for Java Developer) from
http://www.eclipse.org/downloads/
Carbon or Cocoa ? - Cocoa is the native API for Mac OSX, Carbon is phasing out. Cocoa with Java 6 is a 64bits platform on Intel Core 2 Duo. My motto of using the latest and greatest have me go to the 64bits Cocoa version.

- MacOS X has multiple versions of Java installed, by default it's using J2SE 5.0 on 32 bits. Change it by open up the Java Preference application you can find in /Application/Utilities/Java Preferences.


- You can verify it right the right in X shell by execute ...
java -version

B) Install Android plugin

Note: Installation instruction from Android website is available at http://developer.android.com/sdk/eclipse-adt.html
- Start Eclipse and install the Plugin by navigate to Help->Install New Software
- Add a new software site such as
Name=Android, URL=https://dl-ssl.google.com/android/eclipse/
- Wait until the available list is fetched. Select both the Android DDMS and Android Development Tools.
- Follow the prompts to complete the license agreement and installation. Eclipse is going to restart and you can verify it by navigating to File->New->Other, you should see the Android project creation wizard is available.

C) Download Android SDK
- URL to Android SDK site (http://developer.android.com/sdk/index.html) and download the MAC OS X version SDK.
- Unzip the SDK to say (/Users/kchoi/tools/android-sdk-mac)

D) Configure Eclipse and download Android platforms
- On Eclipse, navigate to Eclipse->Preferences->Android, add the SDK location to the Preferences.


- On Eclipse, navigate by Window->Android SDK and AVD Manager, click on Available Packages
- Select to download and install all available platforms and API



- Congratulation, your installation is successfully completed. Create a virtual device by navigate to Window->Android SDK and AVD Manager->Virtual Devices. Click on the Start button to launch the virtual device (i.e. emulator)
- On Eclipse, open the Device control/monitoring UI by navigating to Window->Open Perspective->Other->DDMS




E) All Done, reward yourself with a beer !!!
- We will start programming in the next blog.