kirankunaparaju / google-api-java-client

Automatically exported from code.google.com/p/google-api-java-client
0 stars 0 forks source link

java.lang.NoSuchMethodError: com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient #807

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Version of google-api-java-client 1.15.0-rc

06-28 21:01:21.935: E/AndroidRuntime(6947): java.lang.NoSuchMethodError: 
com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient.<init>
06-28 21:01:21.935: E/AndroidRuntime(6947):     at 
com.google.api.services.drive.Drive.<init>(SourceFile:135)
06-28 21:01:21.935: E/AndroidRuntime(6947):     at 
com.google.api.services.drive.Drive$Builder.build(SourceFile:6542)

Original issue reported on code.google.com by ajaszc...@gmail.com on 28 Jun 2013 at 8:11

GoogleCodeExporter commented 9 years ago
Hi,

i too faced the same error. Is there any workaround to this? I am trying to run 
the demo on code.google.com (Calendar demo v3).

Thanks

Original comment by hearbeat...@gmail.com on 13 May 2014 at 7:48

GoogleCodeExporter commented 9 years ago
Hello,

I also got this error when I deployed Calendar example with some additional 
code:

I got error when I call .build() method.

static Drive loadDriveClient() {
    LOGGER.info("loadDriveClient method");
    HttpTransport httpTransport = new NetHttpTransport();
    JsonFactory jsonFactory = new JacksonFactory();
    AppIdentityCredential credential =
        new AppIdentityCredential.Builder(Collections.singleton(DriveScopes.DRIVE)).build();
    GoogleClientRequestInitializer keyInitializer =
        new CommonGoogleClientRequestInitializer(API_KEY);

    LOGGER.info("create drive builder");

    Builder newDriveBuilder =new Drive.Builder(httpTransport, jsonFactory, null)
      .setHttpRequestInitializer(credential)
      .setGoogleClientRequestInitializer(keyInitializer);

    LOGGER.info("build drive service");
    Drive service = newDriveBuilder.build();

    LOGGER.info("drive service builded");
    return service;
  }

Original comment by danil.ni...@aldigit.com on 2 Feb 2015 at 3:48