我正在創建一個相當簡單的Java客戶端,它連接到我的帳戶並獲取所有事件。這裏我得到一個異常說:Google Calendar API:java.lang.ClassNotFoundException:com.google.common.collect.Maps
java.lang.ClassNotFoundException: com.google.common.collect.Maps
有誰能告訴我哪個JAR我想念,而且從哪裏下載它?
我正在創建一個相當簡單的Java客戶端,它連接到我的帳戶並獲取所有事件。這裏我得到一個異常說:Google Calendar API:java.lang.ClassNotFoundException:com.google.common.collect.Maps
java.lang.ClassNotFoundException: com.google.common.collect.Maps
有誰能告訴我哪個JAR我想念,而且從哪裏下載它?
Google collections,現在被稱爲Guava。
您是否嘗試導入google-collect-1.0-rc1.jar? 它可以在(在源樹)中找到: http://code.google.com/p/gdata-java-client/source/browse/#svn/trunk/java/deps
感謝, 雷努
我通過下載的解決了這個問題的jar文件番石榴r07.jar。 http://code.google.com/p/guava-libraries/downloads/detail?name=guava-r07.zip 試試吧。
對於我們這些誰使用Maven,這裏是爲番石榴的依賴項:
<!-- https://mvnrepository.com/artifact/com.google.guava/guava -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>19.0</version>
</dependency>
信貸,信貸是由於:以上是從http://mavenrepository.com/artifact/com.google.guava/guava/19.0
我還包括番石榴依賴性解決了這個問題。番石榴是舊的Google Collections Library的超集。這裏是鏈接:https://mvnrepository.com/artifact/com.google.guava/guava/21.0 在你的build.sbt中包含這個依賴關係
謝謝基督徒!幸運的是,我們也搬到了maven(很多人在我問這個問題之後) – Vini 2016-08-27 06:02:18
是的,我意識到我對這個派對有點遲到。希望有人會從我的回答中受益。 – 2016-08-31 19:03:39