Wednesday 24 December 2014

Setting my machine for Android Development


This tutorial explains how to set up your Windows machine for Android development. It also explains some of the basic things that you need to know when starting with your Android installation.


At the time of writing this article Android Lollipop is the latest version, so most of the tutorials will be based on that. 

Downloading and opening the IDE:

Eclipse is one of the IDE (Integrated Development Environment) which is used to develop Android application. You can download Android SDK (Software Development Kit) with the Eclipse IDE from this link Android Developer site

Once you download and extract the zip file inside that you should be able to find out folder structure as shown below.



The eclipse folder contains the IDE, the SDK folder contains the Android software. You can go into the eclipse folder and double click on eclipse.exe, this will open the Eclipse IDE and will ask for a default workspace location, and this is where all your code will be saved. Chose a location and click ok. You can change this location later.

Setting the Android SDK:


Once you open the IDE you should be able to see a screen similar to this, once done start the Android SDK Manager either by clicking the Icon or from Windows à Android SDK Manager menu.



This will open the SDK manager as below, at this stage you need decide on which version you want your android application to run based on that you need to install SDK Platform and System Image. Below screenshot also shows that I have already installed the Android SDK and the system Image for Android version L this is a preview version, you can use Android 5.0. Once selected click on “Install 6 packages” button (6 may vary based on the items you select).



Note: To test the application in any other version you need to select the appropriate SDK and System Image of that version.
SDK Platform: This is the one which is used to develop the application and test them.
System Image: To run and test the application before deploying in any real Android device, Google provides an option to test it in a Virtual Device for creating the it we need this system image to be available.
AVD: Android Virtual Device are those actual virtual device created using Android System image.

Creating the Emulator:


Once we have completed the above download click on Android Virtual Device Manager icon or Window à Virtual Device Manager as below.


This opens the Android Virtual Device Manager as below, click on the Create button





Provide the following details,
AVD: Name for your device
Device: Any device available in the market to set the height, width and screen resolution.
Target: What’s the target OS that to be running on this device.
CPU/ABI: ARM (as per my knowledge most devices run based on this)
SD Card Size: Give a size for your SD card min size is enough.


Click on Ok, this will create the AVD for you and that will display in the list now you can select the AVD name and click on start. If it shows a Launch Option screen just click ok. Once done you can see your device is starting and getting ready after a couple of minutes you should be able to see the device ready as below.


Alternatively you can create a device by navigating to the tab “Device Definition” in AVD manager, select any existing device and click “Create AVD” which just creates the AVD with pre-configured details.


Finally we have completely set up our machine for Android Development, now lets start with developing the application and run in Android.

No comments: