Google Drive Web API(Android应用程序)-创建文件在调试中工作正常,在proguard中不工作

k

我正在尝试创建创建文件的简单android应用。它在调试时可以完美运行,但是,当我使用proguard导出应用程序时,它仅创建名称为“ UNTITLED”的文件。这怎么可能?文件内容正确,只是标题始终未定义。只需确定它在这里:

File file = new File();
file.setTitle("hello.txt");
file.setMimeType(MIME_TYPE);

// file content
java.io.File temp = createTempFile("simple content");
FileContent mediaContent = new FileContent(MIME_TYPE, temp);
File createdFile = service.files().insert(file, mediaContent).execute();
k

好的,我找到了原因-绝对是proguard问题,解决方案是将其添加到我的proguard配置中:

-keep class com.google.api.** {*;}

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

使用Google Drive API上传PDF文件-Google Drive Web Client中没有预览

来自分类Dev

使用Google Drive API上传PDF文件-Google Drive Web Client中没有预览

来自分类Dev

如何使用Google的Python Drive Client API在Team Drive中创建文件夹?

来自分类Dev

如何在Google Drive Android API中获取已创建文件夹的DriveId

来自分类Dev

Google Drive 管理应用程序中缺少应用程序图标

来自分类Dev

Google Sheet API 4 - 我们可以访问由 Google Drive 中的 App Engine 应用程序创建的文件吗?

来自分类Dev

利用MapActivity的Android应用程序中的Google API错误

来自分类Dev

403:在google drive api php中创建文件夹时权限不足

来自分类Dev

适用于Android的Google Drive Web服务API-在文件夹中显示文件名

来自分类Dev

适用于Android的Google Drive Web服务API-在文件夹中显示文件名

来自分类Dev

Google +登录并在iOS应用程序的Google Drive中将.csv文件保存

来自分类Dev

计划Android Google Drive API中的drive.appdata范围

来自分类Dev

计划Android Google Drive API中的drive.appdata范围

来自分类Dev

使用 Google Drive REST API 创建文件访问请求

来自分类Dev

Web 应用程序中的 Restful API

来自分类Dev

Google Drive API附加文件?

来自分类Dev

Google云端硬盘API-我可以将Google文档集成到我的Web应用程序中吗?

来自分类Dev

使用Google App Engine创建Web应用程序?

来自分类Dev

使用Google Drive API SDK从Google Drive删除文件

来自分类Dev

Google Drive API:如何从Google Drive下载文件?

来自分类Dev

使用Google Drive API在指定的Google Drive中上传文件

来自分类Dev

Google Drive API下载工作表问题

来自分类Dev

使用应用程序脚本将文件下载到Google Drive文件夹

来自分类Dev

如何在我的Google Web Engine Web应用程序中包含php.ini文件?

来自分类Dev

Google 将使用照片引用检索的 API 图像放置在返回二进制数据的 Web 应用程序中

来自分类Dev

Google Drive Android API在关闭后如何工作?

来自分类Dev

在Linux中的ASPNET Core 3.1 Web API应用程序中的IWebHostBuilder时IHostBuilder无法正常工作

来自分类Dev

通过Mac中的Eclipse在Google App Engine中创建新的Web应用程序项目

来自分类Dev

适用于已安装的应用程序c#的Google Drive Api

Related 相关文章

  1. 1

    使用Google Drive API上传PDF文件-Google Drive Web Client中没有预览

  2. 2

    使用Google Drive API上传PDF文件-Google Drive Web Client中没有预览

  3. 3

    如何使用Google的Python Drive Client API在Team Drive中创建文件夹?

  4. 4

    如何在Google Drive Android API中获取已创建文件夹的DriveId

  5. 5

    Google Drive 管理应用程序中缺少应用程序图标

  6. 6

    Google Sheet API 4 - 我们可以访问由 Google Drive 中的 App Engine 应用程序创建的文件吗?

  7. 7

    利用MapActivity的Android应用程序中的Google API错误

  8. 8

    403:在google drive api php中创建文件夹时权限不足

  9. 9

    适用于Android的Google Drive Web服务API-在文件夹中显示文件名

  10. 10

    适用于Android的Google Drive Web服务API-在文件夹中显示文件名

  11. 11

    Google +登录并在iOS应用程序的Google Drive中将.csv文件保存

  12. 12

    计划Android Google Drive API中的drive.appdata范围

  13. 13

    计划Android Google Drive API中的drive.appdata范围

  14. 14

    使用 Google Drive REST API 创建文件访问请求

  15. 15

    Web 应用程序中的 Restful API

  16. 16

    Google Drive API附加文件?

  17. 17

    Google云端硬盘API-我可以将Google文档集成到我的Web应用程序中吗?

  18. 18

    使用Google App Engine创建Web应用程序?

  19. 19

    使用Google Drive API SDK从Google Drive删除文件

  20. 20

    Google Drive API:如何从Google Drive下载文件?

  21. 21

    使用Google Drive API在指定的Google Drive中上传文件

  22. 22

    Google Drive API下载工作表问题

  23. 23

    使用应用程序脚本将文件下载到Google Drive文件夹

  24. 24

    如何在我的Google Web Engine Web应用程序中包含php.ini文件?

  25. 25

    Google 将使用照片引用检索的 API 图像放置在返回二进制数据的 Web 应用程序中

  26. 26

    Google Drive Android API在关闭后如何工作?

  27. 27

    在Linux中的ASPNET Core 3.1 Web API应用程序中的IWebHostBuilder时IHostBuilder无法正常工作

  28. 28

    通过Mac中的Eclipse在Google App Engine中创建新的Web应用程序项目

  29. 29

    适用于已安装的应用程序c#的Google Drive Api

热门标签

归档