How to Update Google Play Services for Android Studio 2.2 Emulators

updating Google play services in Emulator

Update On 18-Dec-2017

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

Google Play Support - From Google : We know that many app developers use Google Play
Services, and it can be difficult to keep the service up to date in
the Android Emulator system images. To solve this problem, we now
offer versions of Android System Images that include the Play Store
app. The Google Play images are available starting with Android Nougat
(API 24)
. With these new emulator images, you can update Google Play
Services via the Play Store app in your emulator just as you would on
a physical Android device. Plus, you can now test end-to-end install,
update, and purchase flows with the Google Play Store.


Quick Boot - Quick Boot allows you to resume your Android Emulator
session in under 6 seconds

Android CTS Compatibility

Performance Improvements - With the latest versions of the Android
Emulator, we now allocate RAM on demand, instead of allocating and
pinning the memory to the max RAM size defined in your AVD.

Virtual sensors

Wi-Fi support

GPS location and Many more...

OR

Update this SDK Build-Tools and Android Emulator to latest and this alert message will not come again,

Settings --> Android SDK --> SDK Tools(tab) --> Android SDK
Build-Tools

Sample Image

How to update Google Play Service in the Android emulator

This happen everytime you have a mismatch between the version of Google Play Services installed in your device (or image), with the ones requested by the Play Services libraries you are using.

The first thing to do is to be sure that the image you are using is updated to the last version.

The second thing is to know which version is currently installed in the image.
You can found it going in Settings->Apps->Google Play Services and you can find the version like in the example image below

Sample Image

Then when you know which version is installed, you could try to:

  • Update the Play Services with newer packages you can find online here.
    To use this technique you need to follow this small guide:

    Step 1 Create a new AVD with an API image which doesn't contain the Google APIs.

    This is the key of everything, in this way you can't obtain
    INSTALL_FAILED_UPDATE_INCOMPATIBLE because there are no GPS already
    installed in your emulator :D).
    In your case, for API 18, you need to download the Android image indicated with the red arrow below.
    Sample Image
    Then finish to setup the AVD.

    Step 2 You need to know which version of the Google Play Services to download. You said in the emulator with Google API there is 9.2.56 version, which doesn't work with your 10.0.1 libraries in your app. So let's install GPS with at least version 10.2.91 from ApkMirror, i selected the version with ABI x86 (because you downloaded the x86 version) and with Density nodpi (so you can be sure that it will work on every screen size). Click here to download the APK

    Step 3
    Launch the AVD configured in Step 1 and drag the downloaded GPS apk on top of it. It should install the Google Play Services without problems. Run your app and see if it works.

  • Use a real phone (if you have access to a real phone :D) where Play Services can be updated easier from Play Store

  • Use a downgraded version of the Play Services library in you app (be carefull with this because if you used some new APIs your app will not compile)

AndroidStudio emulator won't run unless you update Google Play Services

I downgraded the SDK from 5.1 to 5.0 and it's working.



Related Topics



Leave a reply



Submit