Google通讯录,谷歌应用引擎上的Google Drive 1.7.5 JAVA [英] Google Contacts, Google Drive on Google App Engine 1.7.5 JAVA

查看:328
本文介绍了Google通讯录,谷歌应用引擎上的Google Drive 1.7.5 JAVA的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用

  gdata-contacts-3.0.jar,
google-api-services-drive-v2- rev43-1.12.0-beta.jar,
guava-13.0.1.jar

Google云端硬盘可以正常使用,但不适用(我尝试了各种解决方案,但从未在Google App Engine上一起工作,因为它在本地Devmode中工作。)



调用:ContactsService gservice = new ContactsService( ...);


引起:java.lang.NoSuchMethodError:
com.google.common.collect.ImmutableSet .copyOf([Ljava / lang / Object;)Lcom / google / common / collect / ImmutableSet;

at
com.google.gdata.wireformats.AltFormat $ Builder.setAcceptableTypes(AltFormat.java:399)
at
com.google.gdata.wireformats.AltFormat $ Builder.setAcceptableXmlTypes(AltFormat.java:387)
at com.google.gdata .wireformats.AltFormat。(AltFormat.java:49)
at com.google.gdata.client.Service。(Service.java:558)



解决方案

好了,现在可以使用了。没有人能够看到我曾经用来从Eclipse插件添加Google API。



这不仅仅是添加了不能组合使用的新罐子,而且还将我的项目中的子文件夹中的所有旧罐子保留为.google_apis。 ..。不知何故,那些将它加入Google App Engine 并开始了奥德赛。



删除这些内容后,一切正常。再说一遍,正如无处不在的提及的那样,我使用了一种混合的番石榴版本,其性质并不期望被激活。

using

gdata-contacts-3.0.jar, 
google-api-services-drive-v2-rev43-1.12.0-beta.jar,
guava-13.0.1.jar

Google Drive works but not Google Contacts. (i tried all kinds of solutions but never got both working together on Google App Engine where as it works in local devmode.)

calling: ContactsService gservice = new ContactsService("...");

Caused by: java.lang.NoSuchMethodError: com.google.common.collect.ImmutableSet.copyOf([Ljava/lang/Object;)Lcom/google/common/collect/ImmutableSet;

at com.google.gdata.wireformats.AltFormat$Builder.setAcceptableTypes(AltFormat.java:399) at com.google.gdata.wireformats.AltFormat$Builder.setAcceptableXmlTypes(AltFormat.java:387) at com.google.gdata.wireformats.AltFormat.(AltFormat.java:49) at com.google.gdata.client.Service.(Service.java:558)

解决方案

OK now it works. Nobody was able to see that i used to

Add Google APIs from the Eclipse Plugin.

This does not only just add new jars that do not work in combination but also leaves all those old ones in a subfolder in my project ".google_apis...". Somehow those made it to Google App Engine and the odyssey started.

After removing those ... everything works fine. So again and, as everywhere mentioned, i was using a mixed guava version bulk which human nature does not expect to being activated.

这篇关于Google通讯录,谷歌应用引擎上的Google Drive 1.7.5 JAVA的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆