Configuring Android Emulator to Run Google Map v2

android-map-v2-on-emulatorRunning Android Google Map v2 on emulator is not straight-forward. Google Map v2 is “so far” not running on the default emulator even if you try all the options e.g. changing the target “Android API x” or “Google API”.

The only “relatively easy” solution is to manually install two apk “Google Play services & Google Play store” files on the emulator.

 

 

 

( 1 ) Create a new AVD “Emulator”

  • AVD Name: Emulator-API-19
  • Device: Nexus S  (you can try different device)
  • Target: Android 4.4 – API Level 19 (you can try other versions but higher than 3.0+ & non Google API)

android-avd-map-v2

( 2 ) Download Two .apk Files

  1. Google Play services apk: download the latest from https://play.google.com/store/apps/details?id=com.google.android.gms using this apk downloader website http://apps.evozi.com/apk-downloader/
  2. Google Play store apk: http://www.androidpolice.com/2013/08/13/download-latest-google-play-store-4-3-11-teardown/ 4.4.22 was the latest at the time of writing this post.

( 3 ) Install the apks Files

Use the following command to install the apk on the emulator.

[location of apk file] >adb install com.google.android.gms.apk 

[location of apk file] >adb install com.android.vending-4.4.22.apk
  • Run the emulator we created in step 1 “Emulator-API-19″
  • Run command prompt
  • Type the first command and wait until you get Success message then run the second one.
  • Make sure you get Success message

( 4 ) Ready!

Now the emulator is ready.

  • Restart the emulator
  • Deploy your app

android-map-v2-on-emulator