2012-12-21 43 views
7

我的應用程序試圖用Google Plus簽名用戶時,我開始收到「發生內部錯誤」,我很好地使用了它,並且沒有改變。代碼很長一段時間沒有改變。谷歌加客戶端「發生內部錯誤」

GmsClient返回

connect: bindService returned true for Intent { act=com.google.android.gms.plus.service.START } 
service broker connected, binder: [email protected] 

,右後,顯示敬酒消息 「發生內部錯誤」。

我試圖編譯Google SDK +示例並在同一設備上運行,但它顯示相同的錯誤。 也許在Google API中有所改變?

回答

5

這太愚蠢了,但我還沒有發現任何信息使用谷歌搜索互聯網和組。 但它解決了更換:

//static final String[] SCOPES = new String[] { Scopes.PLUS_PROFILE, PLUS_WRITE_MOMENT }; 
static final String[] SCOPES = new String[] { Scopes.PLUS_PROFILE }; 

似乎因爲PLUS_WRITE_MOMENT的發生的錯誤... 我不明白爲什麼,但沒有這個它的工作原理。

我喜歡谷歌...

+4

我有同樣的錯誤,但無法得到的方式,將修復從答案? –

+1

供參考:此答案現在已過時,現已在2月28日發佈的Google+登錄版本和新SDK中過期。 – BrettJ

10

我的 「內部錯誤發生」 的解決方案:

遵循https://developers.google.com/+/mobile/android/getting-started

演示它通過

mPlusClient = new PlusClient.Builder(this, this, this) 
       .setVisibleActivities("XXXX/AddActivity", "XXXX/BuyActivity") 
       .setScopes("PLUS_LOGIN") // Space separated list of scopes 
       .build(); 

而在我自己的應用程序創建PlusClient,當我刪除」 .setScopes( 「PLUS_LOGIN」)「並顯示爲:

mPlusClient = new PlusClient.Builder(this, this, this) 
     .setVisibleActivities("XXXX/AddActivity", "XXXX/BuyActivity") 
     .build(); 

錯誤已解決,有線!

+0

And donot forget add「」權限 – Door

1

我的經驗/解決方案:

我試過上面列出的一切(檢查客戶端ID,同意畫面,變化範圍等)。沒有任何事情永久解決了我的問題。

當我使用這個瀏覽詳細ADB日誌:

adb shell setprop log.tag.GooglePlusPlatform VERBOSE 

我得到了以下日誌:

I/GLSUser ( 854): GLS error: BAD_REQUEST [email protected] oauth2:profile https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/plus.me https://www.googleapis.com/auth/contacts.readonly 

最後,什麼也解決這一問題,從PlusClient移動(這是不建議使用)使用GoogleApiClient

移民是非常簡單的(這裏很好地解釋:http://www.riskcompletefailure.com/2014/02/migrating-from-plusclient-to.html)。

移動到GoogleApiClient後,我再也沒有得到這個錯誤。

相關問題