0

I'm developing an application with android studio and i use an emulated android device to test it. The emulated device is Nexus 4 with Android 4.4 (with google apis).

In my project, i use the lastest play service client version, the 9.2.0:

enter image description here

When i launch my app on emulator, following message appeare:

enter image description here

The question is: how can i upgrade play service on emulator? Tnx

xcesco
  • 4,690
  • 4
  • 34
  • 65

1 Answers1

0

Just add Google Play Services to you project. To make the Google Play Services API's available to your app, add a new build rule under dependencies for the latest version of play-services.

Open the build.gradle file inside your application module directory.

apply plugin: 'com.android.application'
...

dependencies {
compile 'com.google.android.gms:play-services:9.2.0'
}

Be sure you update this version number each time Google Play services is updated.

As described in the Google Play services overview, Google Play delivers service updates for users on Android 2.3 and higher through the Google Play Store app. However, updates might not reach all users immediately, so your app should verify the version available before attempting to perform API transactions.

Because each app uses Google Play services differently, it's up to you decide the appropriate place in your app to verify the Google Play services version. For example, if Google Play services is required for your app at all times, you might want to do it when your app first launches. On the other hand, if Google Play services is an optional part of your app, you can check the version only once the user navigates to that portion of your app.

You are strongly encouraged to use the GoogleApiClient class to access Google Play services features. This approach allows you to attach an OnConnectionFailedListener object to your client. To detect if the device has the appropriate version of the Google Play services APK, implement the onConnectionFailed() callback method. If the connection fails due to a missing or out-of-date version of the Google Play APK, the callback receives an error code such as SERVICE_MISSING,

Android Enthusiast
  • 4,826
  • 2
  • 15
  • 30
  • I'm already using latest play service. It's not a project settings or dependencies problem. The problem is i can not upgrade google play service on emulator. – xcesco Jul 04 '16 at 10:34