Google drive api ResourceNotFoundException但资源存在

Google drive api ResourceNotFoundException但资源存在,google-drive-api,Google Drive Api,使用api时在Google驱动器文件上随机获取ResourceNotFoundException。 他们工作了几天,过了一段时间就拒绝通过API下载。 我仍然可以从UI访问它们,所有权限设置都正常,但API访问被破坏。 有什么想法吗 com.google.gdata.util.ResourceNotFoundException: OK <!DOCTYPE html><html lang="en" ><head><meta name="descriptio

使用api时在Google驱动器文件上随机获取ResourceNotFoundException。 他们工作了几天,过了一段时间就拒绝通过API下载。 我仍然可以从UI访问它们,所有权限设置都正常,但API访问被破坏。 有什么想法吗

com.google.gdata.util.ResourceNotFoundException: OK
<!DOCTYPE html><html lang="en" ><head><meta name="description" content="Web word processing, presentations and spreadsheets"><link rel="shortcut icon" href="https://ssl.gstatic.com/docs/documents/images/kix-favicon5.ico"><title>Google Docs -- Page Not Found</title><link href="//fonts.googleapis.com/css?family=Open+Sans:300" rel="stylesheet" type="text/css"><style>/* Copyright 2012 Google Inc. All Rights Reserved. */
.goog-inline-block{position:relative;display:-moz-inline-box;display:inline-block}* html .goog-inline-block{display:inline}*:first-child+html .goog-inline-block{display:inline}#drive-logo{color:#91959c;font-family:"Open Sans",Arial,sans-serif;font-size:27px;font-weight:300;position:absolute;text-shadow:0 1px 1px white;white-space:nowrap}#drive-logo img{padding:0 0.4em 0 0;position:relative;top:2px;vertical-align:middle}#drive-logo a{color:#91959c;text-decoration:none}#drive-logo span.goog-inline-block{margin-top:3px;vertical-align:top}</style><style type="text/css">body {background-color: #fff; font-family: Arial,sans-serif; font-size: 13px; margin: 0; padding: 0;}a, a: link, a: visited {color: #112ABB;}</style><style type="text/css">.errorMessage {font-size: 12pt; font-weight: bold; line-height: 150%;}</style></head><body><div style="margin: auto; max-width: 750px;"><div style="margin: 80px 40px 20px 40px; position:relative; "><div style="position: absolute; top: -80px;"><h1 id="drive-logo"><a href="/"><img src="//www.google.com/images/logos/google_logo_41.png" width="116" height="41" alt="Google logo" ><span class="goog-inline-block">Drive</span></a></h1></div><div align="center"><p class="errorMessage" style="padding-top: 50px">Sorry, the page (or document) you have requested does not exist.</p><p>Make sure that you have the correct URL and that the owner of the document hasn&#39;t deleted it.</p><div style="background: #F0F6FF; border: 1px solid black; margin-top: 35px; padding: 10px 125px; width: 300px;"><p><strong>Want to create your own online docs?</strong></p><p>Google Docs makes it easy to create, store and share online documents, spreadsheets and presentations.</p><p>Learn more at <a href="https://docs.google.com">docs.google.com</a>.</p></div></div></div></div></body></html>

    at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:599)
    at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataRequest.java:564)
    at com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:560)
    at com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:538)
    at com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:536)
    at com.google.gdata.client.media.MediaService.getMediaResource(MediaService.java:234)
    at com.google.gdata.client.media.MediaService.getMedia(MediaService.java:286)
    at com.google.gdata.client.media.MediaService.getMedia(MediaService.java:302)
com.google.gdata.util.ResourceNotFoundException:确定
Google Docs--未找到页面/*版权所有2012 Google Inc.保留所有权利*/
.goog内联块{position:relative;display:-moz内联框;display:inline block}*html.goog内联块{display:inline}*:first child+html.goog内联块{display:inline}}驱动器徽标{color:#91959c;字体系列:“Open Sans”,Arial,Sans serif;字体大小:27px;字体重量:300;位置:绝对;文本阴影:0 1px 1px白色;空白:nowrap}#驱动器标识img{填充:0.4em 0;位置:相对;顶部:2px;垂直对齐:中间}驱动器标识a{color:#91959c;文本装饰:无}驱动器标识span.goog内联块{页边距顶部:3px;垂直对齐:顶部}主体{背景颜色:#fff;字体系列:Arial,无衬线;字体大小:13px;页边距:0;填充:0;}a,a:link a:abb}.errorMessage{font size:12pt;font-weight:bold;行高:150%;}

抱歉,您请求的页面(或文档)不存在。

请确保您有正确的URL,并且文档的所有者没有';t删除它。

要创建自己的在线文档吗?谷歌文档使创建、存储和共享在线文档、电子表格和演示文稿变得非常容易。

了解更多信息,请访问

位于com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:599) 位于com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataRequest.java:564) 位于com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:560) 位于com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:538) 位于com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:536) 在com.google.gdata.client.media.MediaService.getMediaResource上(MediaService.java:234) 位于com.google.gdata.client.media.MediaService.getMedia(MediaService.java:286) 位于com.google.gdata.client.media.MediaService.getMedia(MediaService.java:302)
看起来您使用的是旧的Gdata库,而不是新的驱动器SDK。这并不是说它不应该工作,只是它不再是首选API。文档和工具更好地支持Drive SDK


有点奇怪的是,返回的是一个HTML页面,而不是一个简单的API响应。您使用的URL是什么?

看起来您使用的是旧的Gdata库,而不是新的驱动器SDK。这并不是说它不应该工作,只是它不再是首选API。文档和工具更好地支持Drive SDK


有点奇怪的是,返回的是一个HTML页面,而不是一个简单的API响应。您使用的URL是什么?

您好,您是否找到了解决此问题的根本原因?我也面临着同样的问题。嗨,你找到解决问题的办法了吗?我也面临同样的问题。