0

I need to develop an application that would be able to download a given document from Google Drive. I have found out that the recommended technology to use in the Java world is currently the Google Drive SDK.

As described by the quick start guide I have imported the required dependencies to my Maven project like this:

<dependency> <groupId>com.google.apis</groupId> <artifactId>google-api-services-drive</artifactId> <version>v2-rev98-1.17.0-rc</version> </dependency> 

The official sample DriveCommandLine source code (to be found at the bottom of same page) refuses to compile with the following error messages:

  • The import com.google.api.client.json.jackson cannot be resolved (at DriveCommandLine.java, line 8),
  • JacksonFactory cannot be resolved to a type (at DriveCommandLine.java, line 27).

How do I fix it? I'm running Java version 1.7.

1 Answer 1

1

Apparently you need to import the following dependency as well in order for the code to work. It contains the JacksonFactory class.

<dependency> <groupId>com.google.http-client</groupId> <artifactId>google-http-client-jackson2</artifactId> <version>1.16.0-rc</version> </dependency> 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.