2013-08-29 47 views
0

我知道有一百萬篇關於此的內容,我已經閱讀了所有內容。當我嘗試登錄時,我不斷收到內部錯誤。我嘗試了多個android-support-v4和google-play-services jar文件。我曾嘗試將Google Play服務作爲圖書館。GooglePlus oauth發生了內部錯誤

我得到的唯一的警告是這樣的

03-11 11:58:52.465: W/dalvikvm(16989): VFY: unable to resolve static field 1363 (common_google_play_services_install_title) in Lcom/google/android/gms/R$string 

我已清理和跑應用這個與谷歌圖書館的我能找到的每一個罐子/項目。

這是我的連接代碼

String scope = "oauth2:server:client_id:MY_ID:api_scope:" + Scopes.PLUS_LOGIN; 
     String token = ""; 
     Bundle appActivities = new Bundle(); 
     appActivities.putString(GoogleAuthUtil.KEY_REQUEST_VISIBLE_ACTIVITIES, 
        "MY_ACTIVITY"); 
     try { 
      // We can retrieve the token to check via 
      // tokeninfo or to pass to a service-side 
      // application. 
      mAccountName = mPlusClient.getAccountName(); 
      mAccessToken = GoogleAuthUtil.getToken(mContext, mAccountName, scope, appActivities); 
     } catch (GooglePlayServicesAvailabilityException playEx) { 
      Dialog dialog = GooglePlayServicesUtil.getErrorDialog(
        playEx.getConnectionStatusCode(), mContext, 

        0); 
      // Use the dialog to present to the user. 
     } catch (UserRecoverableAuthException recoverableException) { 
      Intent recoveryIntent = recoverableException.getIntent(); 
      startActivityForResult(recoveryIntent, 8); 
     } catch (IOException e) { 
      e.printStackTrace(); 
     } catch (GoogleAuthException e) { 
      e.printStackTrace(); 
     } 

回答

0

**警告,如果你花時間大量在這個問題上* ** * **

請按照下列步驟操作:

  1. 找軟的東西,大和牢不可破的
  2. 坐下來,扣在自己

所以基本上我,我猜通過解決這個問題,並檢查40X,希望它爲你工作。所以事實證明,我的問題是我將clientIds添加到api控制檯的順序。首先,我添加了服務帳戶,然後添加了WEB應用程序最後的ANDROID應用程序。這裏的訣竅是我使用了Web應用程序的ClientID,而不是SERVICE或ANDROID。 Idk爲什麼但那是有效的。在服務帳戶的ClientID工作之前,我遇到過這種情況,但在服務器端交換真正的訪問令牌時不起作用。無論如何,這個過程演變了很多猜測,並希望它適合你。並且記住那個讓你憤怒的大軟件(希望不是你當地的谷歌開發者)

相關問題