繁体   English   中英

java.lang.NoSuchMethodError:com.google.gdata.client.media.MediaService.insert(MediaService.java:318)

[英]java.lang.NoSuchMethodError:com.google.gdata.client.media.MediaService.insert(MediaService.java:318)

DocsService client= new DocsService ("idea");
 client.useSsl ();
  client.setOAuthCredentials (oauthParameters, new OAuthHmacSha1Signer ());
    DocumentListEntry newEntry= new com.google.gdata.data.docs.SpreadsheetEntry ();
        newEntry.setTitle (new PlainTextConstruct ("GIdeaDB"));
        DocumentListEntry insertedEntry= client.insert (new URL (
       "https://docs.google.com/feeds/default/private/full/?xoauth_requestor_id="+                        userEmail), newEntry);

但我在client.insert中获得了NoSuchMethodException(新网址(“https://docs.google.com/feeds/default/private/full/?xoauth_requestor_id="+ userEmail),newEntry);

我做了什么请帮助我....

NoSuchMethodError通常意味着您使用不同版本的库来编译代码而不是用于运行它的代码。

其中一个插入方法有三个参数,一个需要两个参数。 这两种方法都不符合您传入的内容。您编译的库版本和运行的版本是什么? 正如我在评论中所说,如果它编译但不运行,则可能是版本不匹配。

请参阅https://developers.google.com/gdata/javadoc/com/google/gdata/client/docs/DocsService

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM