Android: Running Google Maps v2 on Android Emulator
I am able to have my emulator to run my app with Google Map V.2 (with Google Play Service V.4). I followed steps that others suggested with some failures, however I learned from it and somehow make it work. This is how:
First of all: You must have coded your map app. correctly with all the appropriate permissions setup in your metafile XML, and have Google Play Services APK part of your app. To verify this is true, you must run your app on REAL device and know it works with its map there. Then you can proceed to process your emulator as shown below.
Create a new emulator, or use your existing emulator with specs:
- Target Name = Android 4.1.2
- API Level = 16
- CPU = Any. However, I found ARM is much faster/responsive than x86
- Have enough RAM memory and space MB
Run you emulator (your target emulator must be running!)
Download the following APKs to your local directory (scan for virus!):
Install these two APK into your running (target) emulator with ADB command:
DOS/Console Prompt> adb -e install [path-to-APK-file]
NOTE: Possibly, you have had these APKs installed in your emulator during this trial-error, and need to re-install for some reason. You must uninstall them first by: adb -e uninstall (com.google.android.gms or com.android.vending)
Here, it is where things could get tricky. You think you were done, but when you open your app with Map again, but all you get is an error saying something in the form of: "Google Play services out of date. Requires 2012100 but found 2010110", and may see a button to "Update" Google Play. If this is the case, do NOT attempt to click the update button since it won't do anything. I got this error too, and I resolved it by both of these additional steps:
- Clean-rebuild-reinstall my app into the emulator
- Shutdown my emulator and re-start it.
That's it, it works now nicely.