0

I am trying to setup Drive API. Once I get the GoogleCredential object, I try to create Drive/Calendar service as:

Drive service = new Drive.Builder(httpTransport, jsonFactory, credential).build();

When I try in local (or deploy) I get next error:

java.lang.NoSuchFieldError: MAJOR_VERSION
    at com.google.api.services.drive.Drive.<clinit>(Drive.java:48)
    at com.google.api.services.drive.Drive$Builder.build(Drive.java:9189)

The libraries I am using are:

Libraries

Thank you in advance.

Diego Jovanovič
  • 234
  • 3
  • 14

1 Answers1

1

I found out!

I have created a new project with a servlet to ask for Credentials and then, to create my Drive service and it is working fine.

So, I think my fail is about libraries that my project is using. Maybe, some of them are colliding.

Diego Jovanovič
  • 234
  • 3
  • 14