Mobility is driving you crazy . You wish to create a simple "HelloWorld" program that runs on Android OS. … But you are now confused as to ….How do I go about it or where do I start ?
This post is for "Beginners in Android". So if you are completely new, this post should be of help 🙂 ……
What Is Android ?
Android is an operating system for mobile devices. Applications developed for Android are written in Java programming language.
How do I setup the enviornment for developing applications on Android?
To setup the environment , follow these simple steps:
1) Identify the operating system on your PC. Verify whether it is listed in the "Supported Operating Systems" section. Click on this link to verify http://developer.android.com/sdk/requirements.html
2) Applications for Android are written using Java programming language.Set up the environment to "DEVELOP" Java Programs.
If you have to only run Java programs, then install Java Runtime Environment(JRE). But we will be developing programs, so install Java Development Kit(JDK) which includes JRE . There is no need of separate installation of JRE if JDK is installed.
Note: Identify the operating system and choose the correct version of JDK.
Click on below link to install JDK : http://www.oracle.com/technetwork/java/javase/index-137561.html
3) Surely you won’t write programs in Notepad. You will use an IDE(Integrated Development Environment) to code your applications. Preferred IDE would be Eclipse, but applications can be developed using other IDEs.
To install Eclipse , select proper version of Eclipse(3.5 or newer).
Click on below link : http://www.eclipse.org/downloads/
4) To code applications , download the Android SDK . Android SDK provides tools and APIs to develop programs for Android OS. Download the Android SDK from this link : http://developer.android.com/sdk/index.html
5) Your installed Eclipse IDE should be capable of developing Android programs. So install the ADT plugin for Eclipse. Click here to install the same : http://developer.android.com/sdk/eclipse-adt.html#installing
6) This is last but very important step. Install the essential platform components to complete the installation. This is done using Android SDK and AVD Manager which is installed once you install the SDK.
The above steps may differ depending upon your previous installations if you were developing Java programs. You can log on to http://developer.android.com/guide/basics/what-is-android.html to know more .
In my case , JDK was installed on D drive and the Android SDK on E Drive. I followed the above steps with simple but important settings.
You can relate the above steps to screenshots given below.
Step 1 : Operating System : Windows 7 64 bit
Step 2 : JDK Installation Folder: D:\JavaInstallations\JDK . Set the PATH variable to point to JDK installation.
Step 3,4 : Android SDK zipped package and Eclipse zipped package unzipped at folder location : E:\Programs\Android\Software
Step 5 : Open Eclipse. Select Help-> Install New Software . You will come across the below window. Enter the remote site name http://dl-ssl.google.com/android/eclipse/ . Select the checkboxes and complete installation . Click this link for any problem.. http://developer.android.com/sdk/eclipse-adt.html
a) Android SDK and AVD Manager to install the remaining components. My folder location of this manager is E:\Programs\Android\Software\android-sdk_r08-windows\android-sdk-windows .
Run it and select all to install. After Installation, i could see all the installed packages .
Now lets just create a Simple project in Eclipse real quick:
1) Open Eclipse.Click on the eclipse symbol to load Eclipse.
2) Set the workspace. It is place to store your programs. On File Menu .. Select New -> Project. You will come across below screen.
4) You will see a folder structure with some default code.
4) Run the Application AS Android Application.