Tuesday 24 July 2012

Eclipse configuration with Android SDK


Pre-requisites:
  1.  Eclipse setup
  2. Android SDK setup
  3. ADT Plug-in for Eclipse
  4. AJDT (for AspectJ conversion)

Eclipse:
Download Eclipse from URL:

Version: Eclipse Classic 3.7.2 (Windows 32 Bit)
No need to install the Eclipse, just unzip the downloaded folder anywhere in local drive. That will provide the ‘eclipse.exe’ which will open the Eclipse framework.

On opening the Eclipse framework, it will ask for the location of ‘workspace’ folder (‘Workspace’ is the location where the entire Eclipse project will be saved). Make any workspace folder anywhere in your machine and give the location.

Now Eclipse has successfully configured. Now we can open Eclipse, write any program and can save program to workspace folder.

 Android SDK setup:
We need to setup and configure Android with Eclipse. Basically it is for development process but in case if we need to check how’s the application behave we can have a look on such the application in eclipse.
Download Android-sdk-windows (android-sdk_r18-windows) from the following URL:

No need to install the Android, just unzip the downloaded folder (android-sdk_r18-windows) anywhere in local drive. That will provide the ‘SDK Manager.exe’ (which will open the Android SDK Manager) and ‘AVD Manager.exe’ (which will open the AVD Manager).

     i) SDK Manager: used for installing the Android packages
·         Run the ‘SDK Manager.exe’ (can be found in the ‘android-sdk-windows’ folder)
·         Android SDK manager will provide the list of package to install
·         Install any of the package (like Android 4.0.3 (API 15))


      ii) AVD Manager: used for creating the Virtual Device (emulator)
·         Run the ‘AVD Manager.exe’ (can be found in the ‘android-sdk-windows’ folder)
·         ‘Android Virtual Device Manager’ window will be open.
·         Click on New> and follow the steps as shown in below screenshot:




Name: name of Virtual device (or emulator)
Target: version of Android emulator which you are going to use
CPU/ABI: for Android, use ARM
SD Card ‘Size’: it could be 512MB or 1GB
Snapshot: checked (best practice) [It will keep the track if any activity killed or process crashed, if its enabled we can restore the session ]
Skin ‘Built-in’: HVGA (for Android)

Click on ‘CreateAVD’. It will create the AVD which will be seen in ‘Android Virtual Device Manager’ under ‘AVD Name’ section.
Select the AVD name and click on ‘Start’. ‘Launch Option’ pop-up will be open. Then click on ‘Launch’.  It will open the Android emulator.

ADT plug-in for Eclipse:
 ADT plug-in extends the capabilities of Eclipse to let you quickly set up new Android projects, build an app UI, debug your app, and export signed (or unsigned) app packages (APKs) for distribution.
To install ADT plug-in:
      ·         Start Eclipse> Help > Install New Software....
      ·         Click Add, in the top-right corner.
      ·         In the Add Repository dialog that appears, enter "ADT Plug-in" for the Name and the following URL for the Location:
      ·         https://dl-ssl.google.com/android/eclipse/
      ·         Click OK

Restart the Eclipse. It will ask for the Android SDK (which is we have already install as above mentioned steps) so Just give the location of Android SDK path.
Now while looking on the Eclipse, TWO newly added icons will be shown, these TWO icons are for ‘AVD Manager’ and ‘Android SDK Manager’.

Now Eclipse is configured with Android SDK.

5 comments:

  1. A very nice and informative blog ever seen..i raelly appreciate your hard work



    keep it up man

    ReplyDelete
    Replies
    1. Thanks a lot..stay connected to get updates on new topics!!

      Delete
  2. apple iphone service center in chennai | apple ipad service center in chennai | apple iphone service center in chennai | apple service center chennai |
    I am commenting to let you know what a terrific experience my daughter enjoyed reading through your web page. She noticed a wide variety of pieces, with the inclusion of what it is like to have an awesome helping style to have the rest without hassle grasp some grueling matters.

    ReplyDelete