Google plus客户端“发生内部错误”

时间:2012-12-21 09:00:22

标签: android google-plus

最后一天,当我尝试在我的应用程序中使用Google Plus签署用户时,我开始收到“发生内部错误”,我使用得很好并且没有更改。代码长期没有改变。

GmsClient返回

connect: bindService returned true for Intent { act=com.google.android.gms.plus.service.START }
service broker connected, binder: android.os.BinderProxy@40fdbd20

在此之后显示吐司消息“发生内部错误”。

我尝试编译Google SDK +示例并在同一设备上运行,但它显示相同的错误。 也许Google API中出现了一些变化?

4 个答案:

答案 0 :(得分:10)

我的“内部错误发生”解决方案:

按照https://developers.google.com/+/mobile/android/getting-started

的演示

通过

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

在我自己的应用中,当我删除“.setScopes(”PLUS_LOGIN“)”并显示为:

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

错误已解决,有线!

答案 1 :(得分: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而发生错误... 我不明白为什么,但如果没有它,它就会起作用。

我喜欢谷歌...

答案 2 :(得分:1)

我也有这个问题,突然出现了似乎无处不在。不幸的是,奥列格的回答并没有帮助我。

我的解决方法是在Google API控制台(https://code.google.com/apis/console)中设置OAuth。这很容易设置。这里有快速入门说明:https://developers.google.com/+/quickstart/android

当我第一次创建项目时,Simple API Access工作正常。但是,在不更改任何代码的一个月内,这还不够。

答案 3 :(得分:1)

我的经验/解决方案:

我尝试了上面列出的所有内容(检查客户端ID,同意屏幕,更改范围等)。没有什么能永久解决我的问题。

当我使用以下内容查看详细的adb日志时:

adb shell setprop log.tag.GooglePlusPlatform VERBOSE

我收到了以下日志:

I/GLSUser (  854): GLS error: BAD_REQUEST xxxxx@gmail.com 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后,我再也没有遇到此错误。

相关问题