我的应用程序中有以下代码来启动Map View
private boolean servicesOk() {
int isAvailable = GooglePlayServicesUtil
.isGooglePlayServicesAvailable(this);
if (isAvailable == ConnectionResult.SUCCESS) {
return true;
} else if (GooglePlayServicesUtil.isUserRecoverableError(isAvailable)) {
Dialog dialog = GooglePlayServicesUtil.getErrorDialog(isAvailable,
this, GPS_ERRORDIALOG_REQUEST);
dialog.show();
} else {
Toast.makeText(this, "Connect Connect to Maps", Toast.LENGTH_SHORT)
.show();
}
return false;
}
但是在检查时,isAvailable
的值为9
,而且在LogCat
中不断重复消息:Google Play services is invalid. Cannot recover.
任何人都可以告诉我,我的错误是什么?