由于错误 2,GooglePlayServices 异常不可用
Exception GooglePlayServices not available due to error 2
目前我在 google 播放服务方面遇到了一些问题。根据此消息,服务不可用。另一条消息是:
Google Play services out of date. Requires 11400000 but found 11302470
现在的问题是如何更新 google 播放服务(我使用 play-services-places:11.4.2)
10-08 15:03:55.711 3680-3680/com.mypackage E/GooglePlayServicesUtil:
GooglePlayServices not available due to error 2
10-08 15:03:55.713 3680-3680/com.mypackage W/System.err: com.google.android.gms.common.GooglePlayServicesRepairableException: Google Play Services not available
10-08 15:03:55.713 3680-3680/com.mypackage W/System.err: at
com.google.android.gms.common.zzo.zzbj(Unknown Source)
10-08 15:03:55.713 3680-3680/com.mypackage W/System.err: at
com.google.android.gms.common.zze.zzbu(Unknown Source)
10-08 15:03:55.713 3680-3680/com.mypackage W/System.err: at
com.google.android.gms.location.places.ui.zzb.build(Unknown Source)
10-08 15:03:55.713 3680-3680/com.mypackage W/System.err: at com.google.android.gms.location.places.ui.PlaceAutocomplete$IntentBuilder.build(Unknown Source)
据此,我没有更改设置(需要的)地图。谁能帮帮我?
您需要检查 google 播放服务的版本并根据 return 类型显示错误消息。
这是我用的一个小方法
private void checkGooglePlayServices(){
switch (GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(this)){
case ConnectionResult.SERVICE_MISSING:
GoogleApiAvailability.getInstance().getErrorDialog(this,ConnectionResult.SERVICE_MISSING,0).show();
break;
case ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED:
GoogleApiAvailability.getInstance().getErrorDialog(this,ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED,0).show();
break;
case ConnectionResult.SERVICE_DISABLED:
GoogleApiAvailability.getInstance().getErrorDialog(this,ConnectionResult.SERVICE_DISABLED,0).show();
break;
}
}
错误 2
是 ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED
目前我在 google 播放服务方面遇到了一些问题。根据此消息,服务不可用。另一条消息是:
Google Play services out of date. Requires 11400000 but found 11302470
现在的问题是如何更新 google 播放服务(我使用 play-services-places:11.4.2)
10-08 15:03:55.711 3680-3680/com.mypackage E/GooglePlayServicesUtil:
GooglePlayServices not available due to error 2
10-08 15:03:55.713 3680-3680/com.mypackage W/System.err: com.google.android.gms.common.GooglePlayServicesRepairableException: Google Play Services not available
10-08 15:03:55.713 3680-3680/com.mypackage W/System.err: at
com.google.android.gms.common.zzo.zzbj(Unknown Source)
10-08 15:03:55.713 3680-3680/com.mypackage W/System.err: at
com.google.android.gms.common.zze.zzbu(Unknown Source)
10-08 15:03:55.713 3680-3680/com.mypackage W/System.err: at
com.google.android.gms.location.places.ui.zzb.build(Unknown Source)
10-08 15:03:55.713 3680-3680/com.mypackage W/System.err: at com.google.android.gms.location.places.ui.PlaceAutocomplete$IntentBuilder.build(Unknown Source)
据此,我没有更改设置(需要的)地图。谁能帮帮我?
您需要检查 google 播放服务的版本并根据 return 类型显示错误消息。
这是我用的一个小方法
private void checkGooglePlayServices(){
switch (GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(this)){
case ConnectionResult.SERVICE_MISSING:
GoogleApiAvailability.getInstance().getErrorDialog(this,ConnectionResult.SERVICE_MISSING,0).show();
break;
case ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED:
GoogleApiAvailability.getInstance().getErrorDialog(this,ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED,0).show();
break;
case ConnectionResult.SERVICE_DISABLED:
GoogleApiAvailability.getInstance().getErrorDialog(this,ConnectionResult.SERVICE_DISABLED,0).show();
break;
}
}
错误 2
是 ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED