Skip to content

Android Emulator Setup

Jana Gombitova edited this page Nov 8, 2016 · 1 revision

This page will describe the steps necessary to create an Android emulator to test a version of Flow.

General Steps to Complete

  1. Install the SDK
  2. Install Emulator package(s)
  3. Create an AVD
  4. Start the AVD
  5. While the AVD is running, install apk to AVD using ADB command
  6. Subsequent times you only need to start the AVD because the apk will already be installed (unless there is an update)

Specific Steps

INSTALL SDK

Begin by downloading and installing the Android SDK starter package from http://developer.android.com/sdk/index.html if you have not already done so.

INSTALL EMULATOR PACKAGE(S)

(Detailed instructions at http://developer.android.com/sdk/adding-components.html)

  1. Find and start the SDK Manager application. On windows, you will need to run it as Administrator.
  2. Check the "Updates/New" option.
  3. Pick one or more API levels in the tree. At least level 6 is required. (Note that level 6 itself only shows up if you check the "Obsolete" option. Almost all phones in the world in 2012 are running level 7,8 or 10. Level 14 and up are mostly used on tablets and are larger and take longer to download.)
  4. For your level(s), check (at least) the "SDK platform" and "Google APIs" packages.
  5. Choose "Install Packages" button.
  6. Follow prompts to install including accepting the license and other prompts.

CREATE AN AVD

Now follow the instructions for creating an AVD (Android Virtual Device. This is the actual emulator itself - the shell that the application will run in):

http://developer.android.com/guide/developing/tools/avd.html

The AVD manager can be started from the SDK Manager's Tools menu. It can also be run separately, just like the SDK manager.

  1. Choose New
  2. Assign the AVD a name.
  3. Select a target of Google APIs (Google Inc.) - API Level 6 or later (Note that it is important to pick a choice that begins with Google APIs or FLOW won't install because of missing dependencies (maps API)
  4. It is recommended that you define a value for the SD Card Size in MiB.
  5. Select a Built-in Skin of Default (WVGA800) or larger.
  6. Leave Hardware section alone.
  7. Choose Create AVD.

Start AVD

http://developer.android.com/guide/developing/tools/emulator.html#starting

GUI:

From Android AVD Manager choose Start while AVD is selected

Command line (Windows):

  1. Open Windows Command Prompt (Start Menu -> in run box type "cmd" -> press enter -> should launch DOS Window)
  2. Navigate to where SDK is installed (Note you will need to substitute your username for xxx):
`cd \users\xxx\desktop\android-sdk\tools`
  1. Type:
`emulator -avd <AVD_NAME>`

Command line (OS X):

  1. Open OS X Shell (Navigate to Applications/Utilities/ and double-click Terminal)

  2. Navigate to where SDK is installed:

    cd android-sdk-mac_86-1/tools (or appropriate location)

  3. Type:

    ./emulator -avd <AVD_NAME>

INSTALL APK

You can use adb to copy an application from your development computer and install it on an emulator/device instance. To do so, use the install command. With the command, you must specify the path to the .apk file that you want to install:

adb install <path_to_apk>

For more information about how to create an .apk file that you can install on an emulator/device instance, see Android Asset Packaging Tool (aapt).

Note that, if you are using the Eclipse IDE and have the ADT plugin installed, you do not need to use adb (or aapt) directly to install your application on the emulator/device. Instead, the ADT plugin handles the packaging and installation of the application for you.

Clone this wiki locally