Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Play Services on Android Emulator 4.2.2 or higher. "Google Maps API demos won't run unless you update Google Play Services"

Here are some related threads, but these solutions are not working:

1.Running Google Maps v2 on the Android emulator

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

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

To develop an app using the Google Play services APIs, you need to set up your project with the Google Play services SDK. If you haven't installed the Google Play services SDK yet, go get it now by following the guide to Adding SDK Packages.

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

  • A compatible Android device that runs Android 2.3 or higher and includes Google Play Store.
  • The Android emulator with an AVD that runs the Google APIs platform based on Android 4.2.2 or higher.

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

"Google Maps API demos won't run unless you update Google Play Services"

It gives me an option 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 set this up on a real device and test it, but I would much rather use an android emulator because it is so much faster.

like image 408
BlockchainDeveloper Avatar asked Nov 27 '25 01:11

BlockchainDeveloper


1 Answers

Make sure you are using the Google APIs (Google Inc.) as your Emulator's target. and if this doesn't solve the problem, you can google the newest Google Play Services' apk and install it over adb install.

=-=-= edit =-=-=
It seems like there is a bug regarding to the Google Play services on the API level 22 emulator. I filed a bug for it.
https://code.google.com/p/android/issues/detail?id=176348&thanks=176348&ts=1433887196

Google Play services seems to be fine on API 21, and API MNC

like image 98
kaho Avatar answered Nov 29 '25 14:11

kaho