Running Google Maps v2 on the Android emulator
At the moment, referencing the Google Android Map API v2 you can't run Google Maps v2 on the Android emulator; you must use a device for your tests.
For those who have updated to the latest version of google-play-services_lib and/or have this error Google Play services out of date. Requires 3136100 but found 2012110
this newer version of com.google.android.gms.apk (Google Play Services 3.1.36) and com.android.vending.apk (Google Play Store 4.1.6) should work.
Test with this configuration on Android SDK Tools 22.0.1. Another configuration that targets pure Android, not the Google one, should work too.
- Device: Galaxy Nexus
- Target: Android 4.2.2 - API Level 17
- CPU/ABI: ARM (armeabi-v7a)
- Checked: Use Host GPU
...
- Open the AVD
-
Execute this in the terminal / cmd
adb -e install com.google.android.gms.apk adb -e install com.android.vending.apk
Restart the AVD
- Have fun coding!!!
I found this way to be the easiest, cleanest and it works with the newest version of the software, which allow you to get all the bug fixes.
Please try the following. It was successfully for me.
Steps:
Create a new emulator with this configuration:
-
Start the emulator and install the following APK files:
GoogleLoginService.apk
,GoogleServicesFramework.apk
, andPhonesky.apk
. You can do this with the following commands:adb shell mount -o remount,yourAvdName -t yaffs2 /dev/block/mtdblock0 /system adb shell chmod 777 /system/app adb push GoogleLoginService.apk /system/app/ adb push GoogleServicesFramework.apk /system/app/ adb push Phonesky.apk /system/app/
Links for APKs:
- GoogleLoginService.apk
- GoogleServicesFramework.apk
- Phonesky.apk AKA Google Play Store, v.3.5.16
- Google Maps, v.6.14.1
- Google Play services, v.2.0.10
-
Install Google Play services and Google Maps in the emulator
adb install com.google.android.apps.maps-1.apk adb install com.google.android.gms-2.apk
- Download Google Play Service revision 4 from this link and extra to folder
sdkmanager->extra->google play service
. - Import
google-play-services_lib
fromandroidsdk\extras\google\google_play_services
. - Create a new project and reference the above project as a library project.
- Run the project.
I've successful installed Google Maps v2 on an emulator using this guide.
You should do the following steps:
- Create a new emulator Nexus S, Android 2.3.3. Don't use Google API.
- Install com.android.vending.apk (Google Play Store, v.3.10.9)
- Install com.google.android.gms.apk (Google Play Service, v.2.0.12)