Friday, June 8, 2012

Setting up the Environment

hi again guys!!!

In this post, I'll provide step by step instructions on how to setup the environment for developing Android apps. The 2 softwares you need to download are *Eclipse IDE and *Android SDK. Lets deal with one at a time. Firstly lets try to understand something about Eclipse. What is Eclipse? Eclipse is an IDE which means an Integrated Development Environment where we have various supporting perspectives and components for making our task(developing android apps) easier. Eclipse consists of different plugins and perspectives for different languages like java, JavaScript, C, C++ etc.. So, this is where(Eclipse) we write the code for our app and debug it. I guess thats enough about eclipse. Lets go to Android SDK(Software Development Kit). This kit consists of various api's (Application Programming Interfaces) for various versions of Android OS like gingerbread, Honeycomb, Ice cream Sandwich etc..,  and it also provides an AVD manager. AVD--> Android Virtual Device. This is an emulator that runs our program. Having said that lets move on to installation.



Android SDK:


Download android SDK from here. Install it and open the SDK manager available in the installed directory. This is a time consuming process. It shows the available packages and updates. Install only what is required. Now open the AVD manager available in the same folder. Create a new AVD (Android virtual device) with your custom settings. We are done with it now.


Eclipse IDE:


   Eclipse has a number of stable versions. Go to the website and take a look around. Many developers strongly recommend Eclipse Classic 3.7.2 (Indigo version) , which can be downloaded from here. Choose 32bit or 64bit version based on your OS. It will be downloaded as a zip file. Extract it somewhere, anywhere. Open Eclipse. You are not yet finished with eclipse. You need to install the ADT plugin for eclipse for making android apps.



ADT plugin for Eclipse:


The ADT plugin should be installed as follows:


* Note: Click on the picture to view in high resolution.






Step1:   Help --> Install New Software




Step2: Go to the textfield next to "Works with" label




Step3: Enter https://dl-ssl.google.com/android/eclipse/




Step4: Check Developer tools, click next, and finish the installation.




Step5: After installation is over, restart Eclipse. Now go to Window--> preferences--> Android and select  
            the folder where android SDK is installed and click apply and close the window.




Step6: Go to file--> new --> Android Project. Give a Project name and click next.







Step7: Select the target Android OS version and click next.







Step8: Give a package name as i did in this picture and click finish.





Step9:
Now a sample android project is ready. Lets run it. Right click our sample project in project 

            explorer and select run as --> android application.





Step10: The AVD takes some time to load, so wait and watch. When it finishes loading, our app will be 
              opened. You can see that in the picture.




 
* Note: Click on the picture to view in high resolution. 

Thats it for now guys. In the next post we'll look at the structure of our project and make some modifications to the sample project and see the result. Stay tuned , more is coming......

No comments:

Post a Comment