【发布时间】:2013-07-17 18:20:15
【问题描述】:
在我的 Android 应用程序中,我(肯定)在其他地方启动了一个 appStateClient.updateStateImmediate,其中包含一些数据。但是当回调 onStateLoaded 最终触发后,传入的字节为空。并且为了记录,我到达 onConnected OK。代码如下所示:
开始加载:
appStateClient.loadState(this, 0);
开始保存:
appStateClient.updateStateImmediate(this, 0, bytes); // bytes have content here
响应 onStateLoaded:
@Override
public void onStateLoaded(int statusCode, int statusKey, byte[] bytes)
{
// bytes are null here, statusCode is 7 AKA developer error
在日志猫中看到这个:
07-18 09:11:09.402: E/Volley(7866): [3530] ip.a: Unexpected response code 403 for https://www.googleapis.com/appstate/v1/states/0
07-18 09:11:09.472: E/Volley(7866): [3530] ip.a: Unexpected response code 403 for https://www.googleapis.com/appstate/v1/states/0
07-18 09:11:09.482: E/LoadStateOp(7866): Error executing operation: Access Not Configured
我在 Google API 页面上完成了整个 APP_ID 生成过程,并且只使用了整数部分。我已经验证我使用的是来自 debug.keystore 的相同 SHA1,eclipse 在 Google API 上用作我的 OAuth SHA1,并且那里的包名称与我的
我错过了什么?提前致谢
【问题讨论】:
-
这应该有帮助:stackoverflow.com/a/16601346/1081340? -“取消链接我的应用程序,然后使用正确的证书指纹重新链接它。在 Eclipse 中导出您的应用程序时会显示此指纹(如果您的 ADT 插件是最新的)”
-
我已经摆弄了一些。我只有 Google API 帐户,没有 Google Play 游戏服务帐户。我的印象是您只需要 Google API 帐户。你怎么看?
标签: android google-api google-play-services