【发布时间】:2015-04-28 13:50:03
【问题描述】:
在我的应用程序中,我使用的是 PlusOneButton,并模拟了对实际按钮的自动点击 - 为用户节省了一次点击。 对于未使用其 Google 帐户登录的用户,将显示的下一个屏幕是用于选择帐户的内置 google 对话框。
有时,应用程序在达到此阶段时会崩溃 - 我在日志中看到以下几行
1378-3640/? I/GLSUser﹕ [GLSUser] getTokenFromCache: [account: <ELLIDED:2885>, callingPkg: com.google.android.gms, service: oauth2:https://www.googleapis.com/auth/plus.me https://www.googleapis.com/auth/pos]
1378-3640/? I/Auth.Core﹕ [TokenCache] Missing snowballing token: no granted scopes set.
1378-3640/? I/GLSUser﹕ [GLSUser] getTokenFromGoogle [account: <ELLIDED:2885>, callingPkg: com.google.android.gms, service: oauth2:https://www.googleapis.com/auth/plus.me https://www.googleapis.com/auth/pos
6376-6376/com.myapp.android D/AndroidRuntime﹕ Shutting down VM
6376-6376/com.myapp.android W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x41fced40)
6376-6376/com.myapp.android I/Process﹕ Sending signal. PID: 6376 SIG: 9
看来是在写完这一行之后才发生崩溃
[GLSUser] getTokenFromGoogle [account: <ELLIDED:2885>, callingPkg: com.google.android.gms, service: oauth2:https://www.googleapis.com/auth/plus.me https://www.googleapis.com/auth/pos
因为没有崩溃时我在日志中看不到它。
现在看来禁用自动点击可以解决问题 - 知道可以做些什么来启用这种自动点击吗?
【问题讨论】:
-
您的“自动点击”效果如何? logcat 中没有更多关于“崩溃”的内容吗?必须有一个堆栈跟踪..
-
日志中没有异常 - 我通过定位 PlusOneButton 的一个子项并点击它来进行自动点击
-
您所做的可能违反了 google api 的服务条款。
标签: android google-plus google-play-services google-plus-one