How to update Google Play Services for Android Studio 2.2 emulators?
This may not be relevant to this question now, but wanted to post it here for future explorers, so that they see some land at the end of the sea. I had been struggling with this out of date Google Play Service on my Nexus 5 x86 emulator running API 25 and trying Firebase notification. I am using Firebase 10.0.1 which needs Google Play Services 10.0.1. But on my emulator, I always used to get the message
W/GooglePlayServicesUtil: Google Play services out of date. Requires 1008400 but found 9874900
W/FA: Service connection failed: ConnectionResult{statusCode=SERVICE_VERSION_UPDATE_REQUIRED, resolution=null, message=null}
I had searched extensively a way to update the Google Play Services on my emulator, and whatever was suggested never worked. Finally, I tried creating a new emulator Nexus 5 x86_64 and API 24. Voila!!! It has Google Play Services 10.0.1 and my app works now.
It really beats me why the x86 image does not have the latest Google Play Serviecs and it does not allow me to update it in any manner, while the x86_64 image has the latest Google Play Services.
Hope this helps someone struggling with Google Play Services.
As for my case, I tried checking for updates on Android Studio, as well as the Google Play Services, and restarted Android Studio. Then the update dialog appeared, which allows me to update the emulator images with the correct Google Play Services version.
Wait for the update to finish, then create new AVDs based on the newly updated images, and everything is good to go.
Assuming you're using Android's default AVDs, as opposed to Genymotion, you just have to make sure everything has been updated.
This is what's working for me. If you are using using the current version of play services, 9.6.1 or higher, make sure of the following:
- Your build tools version is 24.0.3 or higher
- In the SDK Manager (SDK Platforms tab):
- If testing Nougat, your emulator is using Google APIs System Image Revision 8 or higher (I'm using "Google APIs Intel x86 Atom_64 System Image")
- Google APIs is installed and updated (For me, "Google APIs, Android 24" - Revision 1.0.0)
- In the SDK Manager (SDK Tools tab):
- Android SDK Platform Tools is version 24.0.3 or higher
- Android SDK Tools is version 25.2.2 or higher
- Google Play Services is installed and using version 33 or higher
- (Probably optional) Google Repository is installed and version 36 or higher
After ensuring all of that, and restarting Android Studio (because better safe than sorry), make a new AVD. I mainly use the following settings: - Nougat (API 24) - ABI - x86_64 - Target - Android 7.0 (with Google APIs)
This is working for me, as I was having the same problem this morning until I updated everything. Good luck :)
In case people are still looking for an answer and haven't found any solution that fixes or updates the Google Play Services on their emulators, here's what helped me. I had followed multiple SO posts that recommend getting latest SDK build tools but missed a very important update. That is, from the SDK Platforms you must update/download
Google Play Intel x86 Atom System Image
A picture is worth a thousand words: