Search code examples
androiddialoggoogle-play-services

Emulator Crashes on click of OK button in "Google play services which some of your applications rely on" dialog


Im getting " Google play services which some of your applications rely on..." crashes when I press the ok button.enter image description here

Here is the code I am using:

    int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);

        try {
            if (status != ConnectionResult.SUCCESS) {
            GooglePlayServicesUtil.getErrorDialog(status, this, RQS_GooglePlayServices).show();
            }
        } catch (Exception e) {
            Log.e("Error: GooglePlayServiceUtil: ", "" + e);
        }

Solution

  • To use GooglePlay service on Android emulator you need Android emulator with an AVD that runs the Google APIs platform based on Android 4.2.2 (API Level >= 17) or higher.

    Please refer to this official document http://developer.android.com/google/play-services/setup.html