0

目前我在使用谷歌播放服務時遇到了一些問題。根據這個消息,服務不是可用的。另一消息是:例外GooglePlayServices因錯誤2而無法使用

Google Play services out of date. Requires 11400000 but found 11302470 

現在的問題是我怎麼能更新的谷歌播放服務(我用的播放服務,地方: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) 

根據這個我沒有更改爲設置(需要)的地圖。任何人都可以幫我嗎?

回答

0

你需要檢查谷歌播放服務的版本,並顯示基於返回類型的錯誤消息。

這是我使用的一個小方法。

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; 
     } 
    } 

錯誤2ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED

相關問題