2
Users.messages:list(下)のサンプルJavaコードを実行しようとしています。しかし、私のIDE(IntelliJの)エラーは 'を実行()' メソッドに:Gmail APIのメッセージが 'execute()メソッドを解決できません'
'cannot resolve method execute()'
私は必要な依存関係、グーグル-API-サービス-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();
エラー:は、メソッドが実行解決することはできません()コンパイル