Configuring the Android Emulator

Configure an Android emulator for testing a Hybrid App package.

Note: The steps or interface may be different depending on the Android SDK version you are using.
  1. Install the Android SDK.
    1. Go to http://developer.android.com/sdk/.
    2. Download the Android SDK (for example, installer_r21-windows.exe).
      Note: For this tutorial, do not download the larger SDK starter package (ADT Bundle for Windows). The starter package includes not only the SDK but also the ADT plug-in for Eclipse and a more recent platform than the one shown in this tutorial.
    3. In Windows Explorer, double-click the downloaded installer to run it.
      Note where the SDK is installed on your system, for example,
      C:\Program Files\Android\android-sdk.
  2. Install the SDK platform tools:
    1. Run the Android SDK Manager, android-sdk\SDK Manager.exe.
    2. In the Android SDK Manager, expand Tools and select Android SDK Platform-tools.
      Android SDK Tools should already be installed.
    3. Expand Android 4.0.3 (API 15) and select these packages:
      • SDK Platform.
      • ARM EABI v7a System Image.
    4. Click the Install n packages button.

      Android sdk manager
    5. In Choose Packages to Install, select Accept All, then click Install. Close the log window when done.
    6. Close the Android SDK Manager.
  3. Run the Android Virtual Device Manager, android-sdk\AVD Manager.exe.
  4. Configure and start an Android emulator instance.
    1. In the AVD Manager, click New.
    2. In the Create new Android Virtual Device window, enter an AVD name and select a supported Android device for this instance.
      For example:
      avd manager
    3. Click OK to add the instance to the AVD Manager.

      avd manager
    4. Select the new virtual device and click Start.
    5. In Launch Options, click Launch to open the Android emulator screen.
  5. Install the Hybrid Web Container on the emulator instance:
    1. With the Android emulator running, open a command prompt window.
    2. Run android-sdk\platform-tools\adb.exe SUP_HOME\MobileSDKversion\HybridApp\Containers\Android\HybridWebContainer.apk.
      For example:
      C:\Android\android-sdk\platform-tools\adb install ^
      C:\Sybase\UnwiredPlatform\MobileSDK<version>\HybridApp\Containers\Android\HybridWebContainer.apk