Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update Google Play Services on the emulator in Android Studio

Hi I am trying to run an Android Program I have created that can connect to Firebase with Authentication using email and password but it seems that I cannot even authenticate due to the fact of them saying my Google Play Service is not up to date.

enter image description here

I am stump here as I have the latest google play services according to my SDK manager

enter image description here

and I don't think it is my code's problem as when I use my friend's phone for debugging it works but not when I am using the emulator.

How can I update my google play services in the Android Studio built-in emulator.

like image 275
Annonymous177 Avatar asked Oct 04 '16 09:10

Annonymous177


People also ask

How to update Google Play Services on emulator?

You can update Google Play Services via the Play Store app in your emulator just as you would on a physical Android device from API 24. check Emulator new features added with stable update from Android Studio v 3.0

Do emulators come with installed Google Play Store?

Since Google introduced Google Play Store images in Android SDK Tools 26.0.0 now emulators comes with installed Google Play Store. Adds a new tab in the extended window for Google Play Store images that displays the Play Services version and a button to check for updates to Play Services.

How to update Google Play Services in Android SDK tools?

Settings --> Android SDK --> SDK Tools (tab) --> Android SDK Build-Tools Show activity on this post. Use emulator that has Play Store installed. Updating play services would be as easy as in real device. Since Google introduced Google Play Store images in Android SDK Tools 26.0.0 now emulators comes with installed Google Play Store.

How do I set up Google Play Services in Android Studio?

Set Up Google Play Services. To develop an app using the Google Play services APIs, you need to set up your project with the Google Play services SDK, which is available from the Google maven repository. For more detailed instructions, and to learn more about Android Studio and related SDK tools, see Update the IDE and SDK Tools.


2 Answers

Since Google introduced Google Play Store images in Android SDK Tools 26.0.0 now emulators comes with installed Google Play Store.

When creating Emulator use images that support Google Playstore (currently Nexus 5 and Nexus 5x with android O)

enter image description here

From 26.0.3

  • Adds a new tab in the extended window for Google Play Store images that displays the Play Services version and a button to check for updates to Play Services.

Edit: Make sure that you use emulator with playstore is installed. Check if you have sdk manager -> sdk platforms -> Android 8 -> Google Play ... system image installed. Download it. Create new emulator using that image.

emulator settings

like image 190
user345280 Avatar answered Sep 24 '22 16:09

user345280


I had the same issue and spent half a day working it out.

In your emulator, go to settings->apps->Google Play Services and compare the version used to what appears in your build.gradle file.

In my case the emulator was running an earlier version and no amount of updates seemed to change it.

In build.gradle, I changed the following:

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

to

compile 'com.google.android.gms:play-services:8.+'

After which I restarted android-studio and it worked flawlessly.

like image 41
kranit Avatar answered Sep 21 '22 16:09

kranit