【发布时间】:2016-05-31 16:05:13
【问题描述】:
我正在尝试运行 Users.messages:list(如下)的示例 java 代码。但是,我的 IDE (IntelliJ) 在 'execute()' 方法上出错:
'无法解析方法execute()'
我有必要的依赖,google-api-services-gmail-v1-rev43-1.2.2.0.jar。我还缺少另一个依赖项吗?
/**
* List all Messages of the user's mailbox matching the query.
*
* @param service Authorized Gmail API instance.
* @param userId User's email address. The special value "me"
* can be used to indicate the authenticated user.
* @param query String used to filter the Messages listed.
* @throws IOException
*/
public static List<Message> listMessagesMatchingQuery(Gmail service, String userId,String query) throws IOException {
ListMessagesResponse response = service.users().messages().list(userId).setQ(query).execute();
错误:无法解析方法执行()编译
【问题讨论】:
标签: java api intellij-idea gmail