我尝试调用AppIdentityService#getDefaultGcsBucketName,但它抛出异常:响应中不包含任何数据。根据文档,默认存储桶应该可以使用了。代码:
//Field
private AppIdentityService service;
//in ctor
this.service = AppIdentityServiceFactory.getAppIdentityService();
//call inside a method
final String baseUrl = GCS_URL + "/" + service.getDefaultGcsBucketName() + "/" + fileName;
答案 0 :(得分:1)
如果您在1.9.0 SDK版本之前创建了应用程序,则必须手动设置默认GCS存储桶。阅读this article以获取更多信息(我知道它适用于PHP,但适用于所有语言)。