Google Play Services on Android Emulator 4.2.2 or higher. "The Google Maps API demos will not work unless you upgrade the Google Play services."

Here are some related threads, but these solutions do not work:

1. Launch Google Maps v2 in the Android emulator

2. How to run Google Map API V2 on Android emulator

I even followed the documentation from Google Developer on this issue. Still nothing.

To develop an application using the Google Play Services APIs, you need to set up your project using the Google Play Services SDK. If you have not installed the Google Play Services SDK, go to it by following the guide to adding SDKs.

To test the application when using the Google Play services SDK, you must use either:

  • A compatible Android device running Android 2.3 or later and includes the Google Play Store.
  • Android emulator with AVD that runs the Google API platform based on Android 4.2.2 or later.

I am using Android 5.1.1 emulator, which is higher than Android 4.2.2, but when I run the code sample for the card, I get a message on the emulator that says:

"Google Maps API demos will not work unless you upgrade your Google Play services."

It gives me the opportunity to update, but when I click on it, I get this message on the screen of my emulator:

"Unfortunatley, Google Maps API Demos has stopped"

Can anyone shed some light on this issue? I can install this on a real device and test it, but I would rather use an Android emulator because it is much faster.

+3
source share
2 answers

Make sure you use Google APIs (Google Inc.) as the target of the emulator. and if this does not solve the problem, you can google the latest Google Play Services' apk and install it on top of adb install .

= - = - = edit = - = - =
It seems that there is an error regarding the Google Play services on the emulator of the API level of level 22. I filed an error.
https://code.google.com/p/android/issues/detail?id=176348&thanks=176348&ts=1433887196

Google Play services seem to be great for API 21, and the MNC API

+7
source

If you use an emulator on the SDK platform with Google Play services, and you still get runtime errors when trying to access the Services APIs ...

Remove the emulator and in the SDK manager also remove the SDK platform on which this emulator was created.

Then reboot this SDK platform and recreate your emulator.

Why?

If the Google Play Services updates were updated since you downloaded the mentioned SDK platform and created this emulator, the outdated version of Google Play Services is probably still in this SDK platform.

I found that the only way to get the latest version of Play Services is to reboot the SDK platform and rebuild the emulator.

0
source

All Articles