Wednesday, October 20, 2010

Using Android Emulator for HTC Aria Device

So, I needed to use the Android emulator for the HTC Aria device (currently on Android 2.1). Not having done this for a long time, I set out to find out what I had to do. Below are the steps that I followed to getting the emulator running with a virtual device that had the characteristics of a HTC Aria. All this information is available online, but in different places. All gathered here for convenience.


Super Quick Start
  1. Install Eclipse 3.5 (requires JDK 5 or 6)
  2. Install Android SDK
  3. Configure proxy
    1. Eclipse -- Window -- Preferences -- General -- Network Connections
  4. Install ADT Plugin for Eclipse (https://dl-ssl.google.com/android/eclipse/) 
    1. Eclipse -- Help -- Install New Software... -- Available Software -- Add Site...  
  5. Configure ADT
    1. Eclipse -- Window -- Preferences -- Android -- SDK Location (from step 2)
  6. Get available packages
    1. Eclipse -- Window -- Android SDK and AVD Manager -- Available Packages
    2. Select URL from step 4
    3. Click Install Selected
  7.  Install HTC Aria skin
  8. Configure Virtual Device
    1. Eclipse -- Window --  Android SDK and AVD Manager -- New


    Somewhat Quick Start

    The first thing that needs to be done is to check your system requirements. Essentially you need  a modern OS (Linux, Mac or Windows) and JDK 5 or 6. My platform:
    • Gateway laptop NV58 Series
    • Intel Core Duo CPU (64 bit) @ 2.2GHz and 4GB RAM
    • Windows 7
    • JDK 6
    1. Install Eclipse 3.5 (requires JDK 5 or 6)
      1. From what I read, version 3.6 is not recommended at this time, so you'll need to install 3.5
      2. Eclipse for Java Developers is what I downloaded, but the other flavors should work too
    2. Install Android SDK
      1. Download the SDK, and unzip it into a folder (I just used it off of C:\. i.e. C:\android-sdk-windows) 
      2. Ensure the Android SDK folder has these sub folders (if not, then create these folders):  add-ons, platforms, and tools
    3. Configure proxy
      1. If you are behind a firewall, and go through a proxy to the internet, then you will need to configure the proxy so that the software download will work through Eclipse.
      2. Eclipse -- Window -- Preferences -- General -- Network Connections
    4. Install ADT Plugin for Eclipse (https://dl-ssl.google.com/android/eclipse/)
        1. Eclipse -- Help -- Install New Software... -- Available Software -- Add
        2. Type in "Android" for the name, and enter the above URL for Location (you may need to change "https" to "http" in the URL above)
        3. Check the "Developer Tools" Checkbox and hit Next button
        4. Then click the Finish button
    5. Configure ADT
      1. Eclipse -- Window -- Preferences -- Android -- SDK Location (from step 2)
    6.  Get available packages
      1. Eclipse -- Window --  Android SDK and AVD Manager -- Available Packages
      2. Select URL from step 4
      3. Click Install Selected
    7. Install HTC Aria skin
    8. Configure Virtual Device
      1.  Eclipse -- Window --  Android SDK and AVD Manager -- New
      2. Type in Name, choose target (Aria is at 2.1, but could choose 2.2).
      3. Choose the skin from step 3
     
    1. Additional Notes
      • You can start your emulator from the command line by getting into a console (Command Prompt on Windows), by issuing the following command from the Android SDK tools directory (i.e. C:\android-sdl-windows\tools\):
        • emulator.exe -avd htc_aria8 
      •  Sometimes I get an error when trying to start the Android SDK and AVD Manager. It says that the Android SDK is not configured. Just try again and/or re-add the Android SDK link to Eclipse -- Window -- Preferences -- Android -- SDK Location
      • To install a Android package to your emulator:
        • Ensure emulator with the virtual device you want loaded is running
          • From the Android SDK tools directory, run the following command:
            • adb.exe install /path/to/my_package.apk
      •  

    1 comment: