Android | Running Google Maps API v2 Sample in Emulator

Here is a simple and straight forward Guide on How to Install and Run Google Maps API v2 Sample Code.

STEP ( 1 )
Preparing your Emulator "AVD"

In Order to Run the Sample Code, you will need to have Google Play Services installed in you "AVD", but due to Google Privacy and Security Reasons it is not Allowed to Install Google Play and you will not be able to even add your Google account, here is a workaround to make it happen.

Here i am using a Galaxy Nexux 4.0 AVD
1) Create new emulator with next configuration:
On other versions I was could not configure because have of various errors when installing the necessary applications.

2) Start emulator and install following applications: GoogleLoginService.apk, GoogleServicesFramework.apk, Phonesky.apk. You can do this with next commands:
2.1 adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock0 /system
2.2 adb shell chmod 777 /system/app
2.3-2.5 adb push Each_of_the_3_apk_files.apk /system/app/
Links to download apk files. ( I have copied it from my rooted android device.
GoogleLoginService.apk -
GoogleServicesFramework.apk -
Phonesky.apk -

3) Install on the emulator Google Play services and Google maps. I have an error 491, if installing from Google Play store. I uploaded apps to the emulator and run installation from it(You can use adb to install this). Links to apps:
Google maps -
Google Play services -


Source :

STEP ( 2 )
Installing the Sample App

Now you can Install the Sample Code Following these Steps:

  1. Select Window > Android SDK Manager and Mark Extras > Google Play Services Then Click Install Packages.
  2. Select File > Import > Android > Existing Android Code Into Workspace and click Next.
  3. Select Browse..., enter <android-sdk-folder>/extras/google/google_play_services/libproject/google-play-services_lib, and click Finish.
  4. Once you have installed Google Play services, you can view the sample code, or run the sample app locally. The sample app is an Eclipse project that you can run on your device as follows:
  5. Select File > Import > Android > Existing Android Code Into Workspace and click Next.
  6. Select Browse..., enter <android-sdk-folder>/extras/google/google_play_services/samples/maps, and click Finish.
  7. Right Click the Project and Select Android Tools > Add Support Library.
  8. Open AndroidMainfest.xml and Add your own Google Maps Android API key.
  9. Select Run > Run to test the sample app.



  1. I have tried your approach but the emulator leads me to the google play website and I am not able to view the map of my application. Has you faced the same problem? Thank you.

  2. go throug the above steps and make sure you select the right version of avd, it is very important to install the *,apk's first...

    i will update the post later with more pictures today .. stay tooned ... (:

  3. Thank you very much for your help Saleh.

    I have followed all your steps, except from the step 2,sub-step 6 because I cannot locate "/extras/google/google_play_services/samples/maps" in my pc.

  4. Hey, I tried installing the apk file via adb command on a windows cmd. But it throws an error as the apk is not signed and cannot be installed. How do I get around this.
    I downloaded the apk's from your dropbox link.

  5. Hey I have tried your approach but I am not able to view the map of my application. I got the system error message. Error message is: Google play service is out of date. I tried a lot to find the solution of that error.

    I tried also another examples of google map at that time only grid is display but not seen the map in my emulator. I got more errors like: 1) " Server returned: 3", 2) "at", 3) "at$MapTileRequest.readResponseData(", 4) "at", 5) "at", 6) "at$".

    Please give me solutions of this problem as soon as early on my mail id. Email is:

  6. hi there all, i will look into it today and get back to you guys with more details instructions ..

  7. really helpful and working.
    thank you.

    p.s. i suggest to install gmaps e googleservices via command line (adb install..). Trying to install via emulator i get error 903.

  8. Hi, I tried the steps mentioned above. I suppose Google maps did get installed on my emulator. I could see Google Play Services and Maps as installed applications (as shown above). Still when I run the sample apps, I get error: This app won't run without Google Play Services, which are missing from your phone. I see a button "Get Google Play Services". When I click on it, the app stops.

    Please help me.

  9. try downloading this google services apk

  10. Hi man and thanks for your job.

    Just a question: Why we can't install Google Login Service, Phonesky and GoogleServiceFramework with command "adb install"? It fails and throws following error: INSTALL_PARSE_FAILED_NO_CERTIFICATES

    Just wanna learn, i'm a noobie android developer. Thanks again.

  11. If you are getting Google play service won’t update issue then, it is recommended to update your google app to fix the latest issues and update your Google app. If you are facing any issue while updating the app, then contact Google for instant guidance. Then, check your settings and clear your cache and cookies. Now, check your password and clear your Google information.

    Google play service won’t update


Post a Comment