【问题标题】:Google Drive Authorization Returns Error 403 usageLimits on Android SDK<14Google Drive Authorization 在 Android SDK <14 上返回错误 403 usageLimits
【发布时间】:2013-04-18 18:17:00
【问题描述】:

我在我的 Android 应用中使用 Google Drive API:

private Drive buildService(final GoogleCredential credentials) {

        return new Drive.Builder(AndroidHttp.newCompatibleTransport(), new GsonFactory(), credentials)
                .build();

    }

使用 accountManager 获取凭证。它可以在 Android 4.0 及更高版本上完美运行。我可以获取/插入/删除文件等。在Android 4.0以下运行时,它总是返回:

"error": {
  "errors": [
   {
    "domain": "usageLimits",
    "reason": "dailyLimitExceededUnreg",
    "message": "Daily Limit Exceeded. Please sign up",
    "extendedHelp": "https://code.google.com/apis/console"
   }
  ],
  "code": 403,
  "message": "Daily Limit Exceeded. Please sign up"
 }
}

这是兼容性问题吗?我正在使用最新的 Drive api 和 google api lib(1.14.1)。谢谢。

【问题讨论】:

    标签: android google-drive-api google-api-java-client


    【解决方案1】:

    您应该在 API 控制台的服务选项卡上启用“Google Drive API”:https://code.google.com/apis/console/

    【讨论】:

    • 我已经这样做了,并且代码在 ICS 上运行良好。 403 错误仅发生在 ICS 之前的系统上。
    • 它应该至少可以在 2.3.x 中正常工作。你还在用同一个证书给apk签名吗?
    猜你喜欢
    • 2012-09-12
    • 1970-01-01
    • 2013-06-29
    • 2015-08-12
    • 1970-01-01
    • 2019-03-28
    • 1970-01-01
    • 2013-10-25
    • 2017-03-21
    相关资源
    最近更新 更多