2016-05-31 3 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 : 구글-API-서비스 - Gmail을 : V1-rev48-1.22.0'

관련 문제