gpt4 book ai didi

android - 错误 :Cannot access the calendar you requested

转载 作者:行者123 更新时间:2023-11-30 04:34:37 26 4
gpt4 key购买 nike

当我将我的 Activity 的 xml 文件发布到 google 的服务器时,有时我会收到下面的 html,我很困惑为什么会这样,但有时是可以的。谁能帮帮我?

是连接错误导致的吗?或者 token 无效?或者什么?

<html><head><meta http-equiv="content-type" content="text/html;charset=UTF-8">
<title>Error</title>
<style type="text/css">body {font-family: arial,sans-serif}</style></head>
<body text="#000000" bgcolor="#ffffff"><table border="0" cellpadding="2" cellspacing="0" width="100%"><tr><td rowspan="3" width="1%" nowrap><b><font face="times" size="10"><font color="#0039b6">G</font> <font color="#c41200">o</font> <font color="#f3c518">o</font> <font color="#0039b6">g</font> <font color="#30a72f">l</font> <font color="#c41200">e</font></font>&nbsp;&nbsp;</b></td>
<td>&nbsp;</td></tr>
<tr><td bgcolor="#3366cc"><font face="arial,sans-serif" color="#ffffff"><b>Error</b></font></td></tr>
<tr><td>&nbsp;</td></tr></table>
<blockquote>Cannot access the calendar you requested</blockquote>
<p></p>
<div style="background:#3366cc; width:1px; height:4px"></div></body></html>

最佳答案

好吧,我不能说我真的喜欢这个问题的答案,但我遇到了同样的问题,经过一番折腾后找到了答案。

Google 有自己的 session ID,可用于此类请求。第一次发出请求时,它会启动 session 并为您提供重定向;它还会导致您在上面看到的错误。据我所知,如果您在设置 session ID 后再次尝试请求,请求将会通过。

换句话说,您必须发送请求并检查 Google 的响应以查看您是否被重定向。如果你是,你有a couple of options获取包含 Google session ID (gsessionid) 的 URL;我选择从响应中解析 Location header ,它显示数据应发布到的 URL。通过发布到该新 URL 再次尝试您的请求(以及任何后续请求),它应该非常有效。只需一点时间即可到达。

有关此的更多信息,请查看 the Google documentation on redirectsthis somewhat related StackOverflow question .

关于android - 错误 :Cannot access the calendar you requested,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7089210/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com