1

I got the Key and set restrict, but I still cannot open map on the Emulator. On the build.gradle, I saw that the google play service is 9.8.0 now, and I think this is the newest one. However, when I run the sample-app, it say I need to update Google Play service?

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.google.android.gms:play-services-maps:9.+'

}

I check on the Android Emulator that it doesn't have Play store. Is it the missing one? I follow this link https://developers.google.com/maps/documentation/android-api/start#step_2_install_the_google_play_services_sdk

to install Google Play services but I cannot found anything that can help. My Android studio version is 2.2.2. I download the GooglePlayServices apk file (com.google.android.gms-9.8.77-440-135396225-APK4Fun.com), I dragged and dropped it into emulator to install, but it has error Error: INSTALL FAIL INCOMPATIABLE

W/GooglePlayServicesUtil: Google Play services out of date.  Requires 9877000 but found 9683470

I need your help.

Joseph
  • 41
  • 1
  • 2
  • 8
  • Possible duplicate of [updating Google play services in Emulator](https://stackoverflow.com/questions/35476182/updating-google-play-services-in-emulator) – Amit Vaghela Dec 19 '17 at 05:41

5 Answers5

2

After 3 days of searching. I found out that the Maps is unavailable to display on Emulator this time. All we have to do is run app on physical device and it will work.

Joseph
  • 41
  • 1
  • 2
  • 8
2

You need to change on build.gradle for the following:

compile 'com.google.android.gms:play-services:9.0.2'

dirtydanee
  • 6,081
  • 2
  • 27
  • 43
1

First, try to check your SDK Manager if the Google Play service there is updated. Also, try to open the stand alone SDK Manager and update the Android SDK Tools, The Android SDK Platform-tools and Android SDK Build-tools.

To update the Google Play service in the emulator itself, check this SO question. It will explain you on how to do this.

Another possible reason for this issue if you uses play-services:9.8.0 is found in this thread. It is stated here that the updated Android tools (which contains the Android Emulator system image) aren't out yet. So in the meantime, try to use downgrade version of play, service instead of 9.8.0.

For more information, check this documentation on how to setup Google Play Services

Community
  • 1
  • 1
KENdi
  • 7,576
  • 2
  • 16
  • 31
  • Thanks for your help. I update everything but it still cannot run on the Emulator. However, I can run it on my physical phone instead. – Joseph Oct 27 '16 at 17:56
1

In the Android SDK Manager, you must install "Google APIs (x86 System Image)" under "Android 4.4.2 (API 19)". Quit Eclipse and restart it.

Then create a new android virtual device in AVD manager and choose "Google APIs x86 (Google Inc.) - API Level 19" as target. Check "Use Host GPU" to ensure the drawing of the map will be accelerated.

That's it, this new emulator will have Play Services preinstalled and it will run faster because it's a x86 image.

1

Yeah, Thank you guys. I can make it work on Emulator now. I use the

compile 'com.google.android.gms:play-services-maps:9.6.0'
Joseph
  • 41
  • 1
  • 2
  • 8