5

One user of my app is facing certain issues specifically on API Level 15 (4.0.4), and I would like to reproduce the issue on my end. I don't have a 4.0.4 device, and I would like to create and emulator for this purpose. I'm running Android Studio 2.0-beta6, and the GUI AVD Manager does not show any API-15 emulator images at all.

So, I have then used the standalone SDK manager to install an API-15 level x86 system image, and then created an AVD from command line as follows.

$ android create avd -n Api-15-Gnex -t 1

Id 1 is the id of the API-15 target on my machine. But, this system image obviously misses the Google APIs in it, and my app depends on Google Play services, and I need them specifically to reproduce the issue.

How can I create API-15 emulator with Google APIs? Preferably from command line, but not necessarily.

Pitty
  • 1,907
  • 5
  • 16
  • 34
C--
  • 16,393
  • 6
  • 53
  • 60
  • 1
    "*AVD Manager does not show any API-15 emulator images at all*" did you install the Google APIs of API 15 ? – Raptor Mar 09 '16 at 03:26
  • Technically, all the download-able images should be listed under images tab in AVD manager GUI. – C-- Mar 09 '16 at 04:26
  • @Raptor But, yes, you are right, Google API's actually provide a target, with which I can create an AVD. Trying now. Thanks. – C-- Mar 09 '16 at 04:28

1 Answers1

10

Thanks to the comment from Raptor. Through stand alone SDK manager, under API-15, select Google APIs and install the package. This adds a new target to the development environment.

$ android list targets
  ----------
  id: 5 or "Google Inc.:Google APIs:15"
    Name: Google APIs
    Type: Add-On
    Vendor: Google Inc.
    Revision: 3
    Description: Android + Google APIs
    Based on Android 4.0.3 (API level 15)
    Libraries:
      * com.android.future.usb.accessory (usb.jar)
          API for USB Accessories
      * com.google.android.media.effects (effects.jar)
          Collection of video effects
      * com.google.android.maps (maps.jar)
          API for Google Maps
    Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800
    Tag/ABIs : default/armeabi-v7a

Note that it is an ARM image, not x86. Since hardware acceleration is not available for APIs less than and including 15, it wont matter, I assume.

Then create a new AVD using this target.

$ android create avd --force -n Api-15-Gnex -t 5
    Auto-selecting single ABI armeabi-v7a
    Created AVD 'Api-15-Gnex' based on Google APIs (Google Inc.), ARM (armeabi-v7a) processor,
    with the following hardware config:
    hw.lcd.density=240
    hw.ramSize=512
    vm.heapSize=48

Now, you may launch it from the GUI AVD manager.

C--
  • 16,393
  • 6
  • 53
  • 60