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 (新的URL ( "https://docs.google.com/feeds/default/private/full/?xoauth_requestor_id="+ userEmail),newEntry);
我所做的请帮助我...
发布于 2012-12-25 16:15:51
NoSuchMethodError通常意味着您使用与运行代码时不同的库版本来编译代码。
发布于 2012-12-25 16:28:38
其中一个插入方法接受三个参数,另一个接受两个参数。这两种方法都不能与您传入的方法相匹配。您正在使用哪个版本的库进行编译,使用哪个版本运行?正如我在我的评论中所说,如果它编译但不运行,很可能是版本不匹配。
请参阅https://developers.google.com/gdata/javadoc/com/google/gdata/client/docs/DocsService
https://stackoverflow.com/questions/14028875
复制相似问题