This is a runtime error that occurs when the device does not have at least the same version of Google Play Services that your app is compiled with.
You should have code in your app that prompts the user to upgrade Google Play Services if they don't have the minimum version required by your app.
The old, now deprecated way was to use GooglePlayServicesUtil:
status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);
if (status != ConnectionResult.SUCCESS) {
if (GooglePlayServicesUtil.isUserRecoverableError(status)) {
GooglePlayServicesUtil.getErrorDialog(status, this,
100).show();
}
}
The new way is to use the new GoogleApiAvailability class, code from this answer:
private boolean checkPlayServices() {
GoogleApiAvailability googleAPI = GoogleApiAvailability.getInstance();
int result = googleAPI.isGooglePlayServicesAvailable(this);
if(result != ConnectionResult.SUCCESS) {
if(googleAPI.isUserResolvableError(result)) {
googleAPI.getErrorDialog(this, result,
PLAY_SERVICES_RESOLUTION_REQUEST).show();
}
return false;
}
return true;
}