我知道这是一个简单的问题,可能是重复的。但我的问题是我是 java android 编程的新手(在 Eclipse 中),我想从 Google Spreadsheets 获取数据。在 Google's documentation 中有一些关于声明 SpreadsheetService 的信息但我无法弄清楚 SpreadsheetService(“app_name”)中的“应用程序名称”是什么。我像这样传递了空字符串
SpreadsheetService servc = new SpreadsheetService ("");
它在设计时正常工作。但它会在 android(运行时)中引发错误。我需要知道那个括号中的“应用程序名称”是什么。请帮助我。
最佳答案
根据类文档here ,该字符串是您的应用程序的名称。
SpreadsheetService(java.lang.String applicationName) Constructs an instance connecting to the Google Spreadsheets service for an application with the name applicationName.
由于您将字符串留空,因此您会得到一个Exception
。
关于java - SpreadsheetService 中的应用程序名称是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24839962/