Android operating system is a growing at a very fast rate and is becoming popular among general public. Since it is an open source platform with good user interface and having a good team of developer who are refining it to make it even better there is a good probability that it might be the top operating system in the future. So, it is worth developing for android devices such as tablets and smart phones. Also it has its own application store (aka android market) -- that has many applications and games developed by thousands of developers around the world -- so it will be easy for you to deploy/distribute your apps and games.

So, in this article I will describe you how you can develop your own android applications and games at your own personal computer with the help of Android SDK and Eclipse for Java IDE. You can use the apps on your personal devices or distribute them among different users around the world either for free or for money through the android market. Either you develop applications and games as your hobby or as a profession you will be truly benefited from it. Developing is an interesting, engaging as well as a fun task to do so you won't regret starting your career as a developer.

So, before we begin writing our source codes we will have to setup a virtual environment where we can compile, run and test our applications. We are going to use open source software Eclipse, an Integrated Development Environment, for writing our source codes and Android SDK for running and testing our applications. We are going to write our apps in Java Programming Language, so it is considered that you know how to write code for java language (No need to worry if you don’t because you can learn it anytime from the resources provided below.) Please, follow the steps below to setup the complete development environment required to develop applications and games for android platform. I’ve also included many useful links and resources at the bottom of the article, so don’t forget to go through them also.

1. Since both Eclipse and Android SDK rely on Java platform, download and install both latest Java Development Kit (JDK) and Java Runtime Environment (JRE) from Oracle’s Download Page.

2. Now Download android-sdk_r12-windows.zip or installer_r12-windows.exe (Recommended) and install Android SDK on your windows PC. Download android-sdk_r12-linux_x86.tgz and android-sdk_r12-mac_x86.zip for Linux and Mac OS respectively.

3. Once you are done with the setup, go to Start Menu>>All Programs>>Android SDK Tools (or alternatively to the install directory) and run SDK Manager.exe.

4. The program with present you the Choose Packages to Install dialog box. Select Android Platform Tools, latest revision (needed) and choose at least one platform from the options available. You can deselect remaining by selecting and then clicking ‘Reject’ radio button below the package description. When you are done click 'Install' and wait till it downloads and install the selected tools and platforms.

For example, if you want to develop for Android 2.3.3 OS (Gingerbread OS) select SDK Platform Tools (needed component for all platforms) and SDK Platform, Android 2.3.3, API 10, revision 2 and deselect others and click install. (Note: You can also install more than one platform to develop & test for different devices running different operating system. You can install them later from Available Packages menu and by expanding Android Repository and selecting the components that you want to install.)

5. Now you will have to setup an Android Virtual Device for running and testing your applications directly within the Eclipse IDE. Select Virtual Devices and click ‘New’ button and fill in the details (Type a name for virtual device in Name Field, select the target OS that you want to develop/test applications on and enter a size for virtual sdcard) and click on ‘Create AVD’ button.

Your virtual android devices will be listed at the Virtual Devices Menu and you can edit its attributes like display resolution, name, etc by selecting it and clicking on ‘Edit’ button at any time.

6. Now download Eclipse IDE for Java from http://eclipse.org/downloads/ and install it. (I use Eclipse Helios Classic 3.6 that comes as a portable application which you don’t need to install, just run the eclipse.exe application file. You can download any that supports Java according to your preferences.)

7. Now it’s time to configure Android Development Tools (ADT) plugin for Eclipse. Run eclipse.exe from your install directory (or alternatively from Start Menu). Go to Help>>Install New Software… You will be presented with Install dialog box. Click 'Add' button and on the displayed Add Repository dialog box type ADT Plugin for Name field and https://dl-ssl.google.com/android/eclipse/ URL for Location field and click ‘OK’ button. Check the box beside Developer Tools and click ‘Next’ button. Wait till it finishes installing and click ‘Finish’ button on completion.

8. The last step!!! Go to Windows>>Preferences and click on Android. Respond to the dialog box and proceed. In the SDK Location in Android Preferences click Browse button and select the installation directory of the android SDK (With default settings it must be C:\Program Files (x86)\Android\sdk but might vary depending on your OS) and then click ‘Apply’ (It will list all the available AVDs, created in step 5) and then ‘OK’ button.

Congratulations!!! You have successfully set up the virtual environment that is required for starting your career as a developer of android platform in your own personal computer. Now to create your own very first project, go to New>>Project…>>Expand Android>>Select Android Project, click ‘Next’ button, enter the details and click ‘Finish’ button. Write down the code and then click 'Run' button on the toolbar to run your very first android application. View screenshot of my first hello world app on Android Virtual Device here.

That’s it. You have successfully configured your android development environment and also written your own very first program. I’ve also included useful links and resources below and recommend you to go through them if you need more help or information.

One last thing, if you want to distribute your software via android application store or market app you can sign up as a developer of android platform just for 25 bucks here. Don’t forget to go through the terms and conditions before signing up as a developer. Wish you all the best for your journey ahead as a developer.

Useful Resources and Links:

Post a Comment Blogger Disqus

  1. Very useful tutorial with lots of good resources. Thanks.

    ReplyDelete
  2. thanks sir. i will used this tutorial as a guide for my thesis on android application #computer science student ^_^

    ReplyDelete
  3. Mention Not. I am glad that the article could come your help. Please do include the link to this site or the article, if you are including the references as footnotes in your thesis. Regards!

    ReplyDelete
  4. Mention Not. I am glad that the article could come your help. Please do include the link to this site or the article, if you are including the references as footnotes in your thesis. Regards!

    ReplyDelete

Please share your view(s) through the comment(s) below.
Thank You!

 
Top