0

I am trying to use Google play Services (on an emulator) in my application for authentication.

There is always an error:

  • Google play services out of date: Requires 4323000 but found 32651.

I have tried running my application in 4.3 and 4.4 emulator with Google APIs but this that doesn't help.

Richard Le Mesurier
  • 29,432
  • 22
  • 140
  • 255
  • Open SDK Manager -> Extras -> Google play services check if it have any update – Marco Acierno Apr 26 '14 at 17:44
  • http://stackoverflow.com/questions/17858215/google-play-services-out-of-date-requires-3159100-but-found-3158130 check this post it may help you. – Meghna Apr 26 '14 at 17:47

2 Answers2

1

You need to go to the SDK manager in eclipse and download the Google Apis for the version of android your trying to use. So under the android 4.4 tab there is a Google Apis package which you need to install! After set up a new AVD targeting the Google API at the level you need.

Edit: Having checked on my emulator, The google api level 19 does work with google maps in the emulator implying that the rest of the services will too. The normal 4.4.2 image complains that google play services is out of date.

CarbonAssassin
  • 855
  • 12
  • 24
1

This answer relates only to devices, not to emulators. Converted to "community wiki" because it does provide useful info for devices.


The error is one of the normal ConnectionResult errors from Google Play Services.

You need to resolve that error, by displaying the appropriate error dialog for that ConnectionResult. Here is some sample code from the online docs:

.

/** Creates a dialog for the Google Play Services error. */
private void showErrorDialog(int errorCode)
{
    // DialogFragment.show() will take care of adding the fragment
    // in a transaction. We also want to remove any currently showing
    // dialog, so make our own transaction and take care of that here.
    FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
    Fragment prev =
            getSupportFragmentManager()
                    .findFragmentByTag(GooglePlayDialogFragment.DIALOG_ERROR);
    if (prev != null)
    {
        ft.remove(prev);
    }
    ft.addToBackStack(null);

    // Create a fragment for the error dialog
    GooglePlayDialogFragment dialogFragment = new GooglePlayDialogFragment();
    // Pass the error that should be displayed
    Bundle args = new Bundle();
    args.putInt(GooglePlayDialogFragment.DIALOG_ERROR, errorCode);
    dialogFragment.setArguments(args);
    dialogFragment.show(ft, GooglePlayDialogFragment.DIALOG_ERROR);
}

Internally the GooglePlayDialogFragment handles many of the upgrade errors, directing the user to the Play Store to update the SDK.

Richard Le Mesurier
  • 29,432
  • 22
  • 140
  • 255