2016-05-31 19 views
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(); 

エラー:は、メソッドが実行解決することはできません()コンパイル

答えて

1

私は同じ問題がありました。 この依存関係をgradleファイルに追加してみると、私の問題は解決しました。

コンパイルは 'com.google.apis:Googleの-API-サービス - Gmailに:V1-rev48-1.22.0'

関連する問題