Monday, October 18, 2010

Preparing Android Development

,
Hi, I want to share about how to prepare Android development. I preffered to prepare it offline. Maybe it's more troublesome but it's a good thing since you can keep the required package at your harddrive and you don't need to rely on an internet connection. Just once when you download the necessary package.

PACKAGE REQUIREMENTS (THE PACKAGE YOU MUST HAVE) :
  1. You must download Android SDK and choose a package that suitable for your operating system. It can be Linux, Mac or Windows.
  2. Look for an android platform and documentation  package from this android repository in xml format. You should have an attention to the tag which have the operating systems that suitable for yours. Here's the example of the platform and docs xml structure :

    <sdk:platform></sdk:platform></sdk:archive>
    <sdk:version>2.2</sdk:version>
    <sdk:api-level>8</sdk:api-level>
    <sdk:codename>
    <sdk:revision>02</sdk:revision>
    <sdk:description>Android SDK Platform 2.2_r1</sdk:description>
    <sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>

    <sdk:archives>

    </sdk:archives>
    </sdk:codename>
    <sdk:archive os="linux" arch="any">
    <sdk:size>76884517</sdk:size>
    <sdk:checksum type="sha1">70b841b828e0db73eb58fc76f480e78783fd5bfc</sdk:checksum>
    <sdk:url>android-2.2_r02-linux.zip</sdk:url></sdk:archive>

    <sdk:archive os="macosx" arch="any">
    <sdk:size>75048163</sdk:size>
    <sdk:checksum type="sha1">e40838cc805fbfea76f62b42d4749f0ca549a058</sdk:checksum>
    <sdk:url>android-2.2_r02-macosx.zip</sdk:url></sdk:archive>

    <sdk:archive os="windows" arch="any">
    <sdk:size>77478546</sdk:size>
    <sdk:checksum type="sha1">e80ddc2f8f9929bc8d46bc579be86d43317adb57</sdk:checksum>
    <sdk:url>android-2.2_r02-windows.zip</sdk:url></sdk:archive>



    <sdk:api-level>8</sdk:api-level>
    <sdk:codename>
    <sdk:revision>01</sdk:revision>
    <sdk:description>Android SDK Docs for Android API 8, revision 1</sdk:description>
    <sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>

    <sdk:archives>

    </sdk:archives></sdk:codename>
    <sdk:archive arch="any" os="any">
    <sdk:size>60112864</sdk:size>
    <sdk:checksum type="sha1">6feead7dd21da36e07838bdfc0ddebdd336940ce</sdk:checksum>
    <sdk:url>docs-2.2_r01-linux.zip</sdk:url></sdk:archive>


    In the xml structure above, look for the tags. There is a filename(bold text) of the package you should download from http://dl-ssl.google.com/android/repository/. So, the URL looks like this : http://dl-ssl.google.com/android/repository/<the package you want to download>. For example if you want to download android documentation package, you should visit http://dl-ssl.google.com/android/repository/docs-2.2_r01-linux.zip.
  3. Download Android Development Tools(ADT) for Eclipse. The latest version is 0.99 but you should check out for the updates periodically.
  4. Download Eclipse 3.6.1 "Helios". There are many Eclipse package in the download page, but I suggest you download the Eclipse IDE for Java EE Developers.
  5. Download the latest JDK 6.

    INSTALLTATION (EXTRACTING THE PACKAGES)
    1. Extract the android-sdk to your harddrive and add the adb(Android Debug Bridge) path to your system PATH. You can find adb inside the tools directory. To test adb is working or not, open your command prompt or console and type adb then hit return. You should see a message from adb, not the something like "command not found" or "bad command or filename" message.
    2. Extract the android platform to the platforms directory inside android-sdk.
    3. Extract android documentation to android-sdk directory.
    4. Extract Eclipse package to your harddrive and execute the Eclipse IDE.
    5. On the Eclipse Help menu, choose "Install New Software" and click Add button on the top-right of dialog window.
    6. Fill the name(up to you) for the repository and click archive button to search the ADT plugin forEclipse Package, and then click OK.
    7. Click select all button to install all of the available plugin from the ADT package and click next to proceed further until you can hit the finish button. After that restart your Eclipse IDE.

      POST-INSTALLATION (CREATE ANDROID VIRTUAL DEVICES)
      1. Open your Eclipse IDE and go to the Window menu. Choose Android SDK and AVD Manager.
      2. Choose Virtual Devices, and click the New button to create a new Android Virtual Device.
      3. Fill the name of the new virtual device. It's up to you.
      4. Select Android target for the virtual device. The Android targets are the Android platforms you have. If the target is Android 1.6, that means the virtual machine is compatible up to Android v.1.6. So, you can't run an Android application that require Android v.2.2 on that virtual device.
      5. Create SD Card with a capacity that suitable for you.
      6. Choose a skin for Android virtual machine.(Built-in skin recommended)
      7. Click new button to add hardware support for your virtual machine and finally click the Create AVD button.
      After the AVD created, you can start to create new Android project from the Eclipse menu. Let's start write a code! :D

      0 comments to “Preparing Android Development”

      Post a Comment