java - Google Drive Java 快速入门指南警告

标签 java google-drive-api

以下是错误。

WARNING: Application name is not set. Call Builder#setApplicationName.

Exception in thread "main" java.io.FileNotFoundException: document.txt (The system cannot find the file specified)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:138)
    at com.google.api.client.http.FileContent.getInputStream(FileContent.java:71)
    at com.google.api.client.googleapis.media.MediaHttpUploader.upload(MediaHttpUploader.java:361)
    at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:418)
    at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:343)
    at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:460)
    at DriveCommandLine.main(DriveCommandLine.java:56)

最佳答案

快速入门应用程序将 document.txt 文件从本地文件系统上传到云端硬盘。在执行代码之前,请将任何名为 document.txt 的文件放在应用程序的工作目录中。

关于java - Google Drive Java 快速入门指南警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17327282/

相关文章:

java - Android 没有得到正确的 boolean 值

java - 定义 POJO 以更改 JSON 响应

java - 我可以使用哪些 mime 类型通过 Google Drive api 导出 Google 协作平台、Google 表单和 Google 脚本?

java - 带推送 utf8 字符串的 Firebase Java API

java - BitmapFactory : Unable to decode stream: java. io.FileNotFoundException:打开失败:ENOENT(没有这样的文件或目录)

java - 我在这段简单的代码中找不到逻辑错误。 Java语言,简单的数学程序

ios - 使用 Google Drive SDK 的 disallowed_useragent

javascript - 弹出窗口阻止 chrome 中的 gdrive 授权

google-drive-api - 表单是否支持 drive.revisions.list?

google-drive-api - 如何为 Google Drive 构建桌面客户端?