Tuesday, 1 January 2013

Android Installation - SDK - AVD Manager


I hope, you have grabbed the concept about Android, from my previous post "What is Android?"

Now you are so excited to create an App in Android. But, still you are one step away from it. To create an app, we need to install some basic required software.


List of Required Software:

(1) Java JDK
(2) ADT Bundle (Includes Eclipse, ADT Plugins, SDK Tools, etc.)



JAVA JDK:

If You already have done some work in Java or for some other purpose, if you have installed Java previously in your desktop or laptop, then you don't need to worry about it. (However if it's an older version, then update it)

JDK is an acronym for Java Development Kit. It was developed by Sun Microsystem and is used to create java application, as well as to develop an Android app. JDK includes JVM (Java Virtual Machine), JavaC (Java Compiler), JBD( Java Debugger) and many other tools.

Those who haven't installed JAVA, they can download it from this link ("http://www.oracle.com/technetwork/java/javase/downloads/index.html") and install it.

ADT Bundle:

Those people who are going to install this software for the first time, applaud your self first. You are so so lucky. The previous method of installing this software was really tedious. Let me clear you, why you are so lucky. ADT Bundle is a Package of Eclipse, ADT Plugins, SDK Tools, Android Platform Tools and other.

In a previous method, everyone had to download each software (Eclipse-SDK Tools-ADT Plug-ins) individually. It was so boring. But now, Google provides the ADT Bundle (Bunch of all software), in which plug-ins are already installed and other software are provided to us in single package.

The brief information of all software is given below.

Eclipse: Eclipase is a Free Open Source Software, which is developed from Java Language and is used to create an application, Plugins and for other use. If you want to install it individually for some reason, then visit this link " http://www.eclipse.org/downloads/" and download it from it.

Android SDK: SDK is a short form for Software Development Kit, and is used to create an Android application. SDK includes Android SDK Tools, AVD manager, sample projects, platform tools, etc.

ADT Plugin: ADT Plugin is an abbreviation of Android Development Tools. It helps eclipse to create application, XML editors, debugging and in many other process.

To download ADT Bundle, visit this link " http://developer.android.com/sdk/index.html ". You will have view as shown here.



Here, as you click on "Download the SDK", Downloading will start automatically. Once it is done, extract it with WinZip or other software.

You will get two folders, SDK and Eclipse. In Eclipse folder, click on the exe file name "eclipse". As the eclipse starts, you will see a dialog box on the screen, where you need to give a location of Workspace (All projects are saved in this folder).





Give a location of Workspace folder and click on OK button. The Home screen of Eclipse will look like this.









Android SDK


To start Android SDK, click on the Window Menu, and then click on Android SDK Manager. You will see the screen, as shown below





Here, you will get all available android versions. The latest version will be installed already. Choose the specific versions in which you would love to make your application, and download it. 

If you don't have internet download limitation, then I recommend you to download most of them or all of them. It may take few minutes or few hours, based on your internet speed. Once it is done, it will look like this.




You have done great Job Mate!!!!

AVD Manager 


AVD (Android Virtual Device) is a device configuration for Android emulator. We can create as many avd as we want of different version of SDK.

AVD is used to run and check an application in different version of SDK (Or Android). We have to set many properties of AVD like Name, Device, Target, SD Card and more. What the great thing about avd is, we don't need to install it as it is included in SDK. We just create number of AVD's as per our requirement.


To Start AVD Manager, click on "Android Virtual Device Manager" available in "Window" tab of Eclipse. As it starts, it will have view as shown here.




Again I would say, applause your self. In previous version of Android there was only one way to create AVD, I mean we had to create AVD manually. But now as you can see, there are two different tab in AVD manager. First Tab is to create AVD manually (The previous Version of AVD), while the second tab (Added in new version) is to create AVD for specific Android device. Don't scare, just follow me.


Before Creating AVD, I suggest you to download the most or the entire version of Android SDK.



 Way 1:


To create an AVD, click on the "New" button of AVD Manager.





Give an appropriate name of AVD, then click on Device where you get options as shown here. You can choose any specific device size like (3.2", 3.7", 5.4" for mobile devices & 7.0", 10.1" for Tablet Devices) or any specific device like (Galaxy Nexus, Nexus 7, Nexus one).





Once you select the device of your choice, click on Target where you would have choices of different Android devices (which you installed in Android SDK). Select the one that you would love the most.





In Keyboard and Skin, it is your choice whether to keep it default or change it. If you enable the Keyboard option, then it will let you to use your physical keyboard for your interface with it. Internal Storage default size is 200 MB; you can change it if you want. The SD Card size should be more than 9 MB, give appropriate value of it. Choose remaining options, and click on OK button.




Hey Guys, It's done now...




What's this confusing stuff? Don't scare friends; it's just info of each process running in the background of eclipse. I created new AVD and each process of it is displayed in the Console Window of eclipse, with date and time. To see the Console view, click on the Window Menu. Now click on the "Show View", where you get the "Console" View option.




Way 2:

Now we use another way to create an AVD, the easiest way to create it. For that, click on second tab (Device Definitions) of AVD manager. Here you get different devices and you can choose any of them, like I have selected 7.0" WSVGA (Tablet).


Note: The great thing about "Device Definitions" is, you can create your own devices by clicking on "New Device" option, and use it whenever you required. Also you can make clone of specific device.



To create AVD of specific device, choose any device and click on "Create AVD" option. You will see one new window as shown below, where everything is filled up. If you want to keep it as default, then just click on OK button.


Isn't it so easy???




Another AVD is ready mate!!!!


All AVD's that you have created, can be seen in AVD Manager. Now select one of them, and click on "Start" button. When emulator starts, it looks like this.




Note: If you don't want to display the right hand part of emulator then disable the "Skin" option, when you create new AVD or edit the current AVD.


Once it is loaded completely, it looks like this.



It looks fully awesome..........




12 comments:

  1. it was excellent and very informative post. Its really very useful.I found a lot of informative stuff in your article. Keep it up.

    android apps development

    ReplyDelete
  2. How to install Skin for Samsung Phone Emulator.

    New in the folder android-sdk \ tools \ lib \ Emulator \ skins \ dynamic

    how to install?

    ReplyDelete
    Replies
    1. It seems, your answer is in your question. You get all the images in this folder "android-sdk \ tools \ lib \ Emulator \ skins \ dynamic".

      If you want to use other skin / Images, just replace the current images.

      Delete
  3. This comment has been removed by the author.

    ReplyDelete
  4. can u please solve my i problem that is i cant launch the emulater even if i have install all the package bu it showing error in start emulater-" Starting emulator for AVD 'aaaa'
    emulator: warning: opening audio input failed"
    can you sugest me what to do please please help me.

    ReplyDelete
    Replies
    1. Hello Shilpa,

      First of all, If you have older version of ADT Bundle or sdk manager, then update it.

      If everything is perfect, you visit this link to solve your problem.

      http://stackoverflow.com/questions/11682829/emulator-warning-opening-audio-input-failed-displayed-in-the-console-while-a

      Still if you get the problem, try to create different emulator changing the properties of it and run it.

      Delete
  5. Make AVD faster
    http://www.lirent.net/2013/12/speed-up-android-virtual-device-avd/

    ReplyDelete
  6. please help me i am download android sdk with installer and open sdk manager and download android tools android 4.4.3 appi and other packages and i cannot create avd the program say not target selected i am select android 4.4.3 api and proogram again sya not target selected

    ReplyDelete