如何添加番石榴到Eclipse项目 [英] How to add Guava to Eclipse project
问题描述
Eclipse的赫利俄斯3.6
的Windows XP SP3
Eclipse Helios 3.6
Windows XP SP3
我已经使用了Eclipse做下载番石榴SDK:
1)在Eclipse中去的帮助>安装新软件... 的
2)在的工作:的文字我用下面的网址
I have used Eclipse to download the guava SDK by doing:
1) In Eclipse go to Help > Install New Software...
2) In the "Work with:" text box I used the following URL
<一个href="http://svn.$c$cspot.com/a/eclipselabs.org/guava-bundle/trunk/repository/">http://svn.$c$cspot.com/a/eclipselabs.org/guava-bundle/trunk/repository/
3)发现,番石榴:谷歌核心库的Java 1.5运行时和SDK,所以我点击确定,每一个消息,他们似乎安装罚款。
现在,我想用它在我的code(对于一个Android应用程序),我试图导入添加到我的类文件中的一个
http://svn.codespot.com/a/eclipselabs.org/guava-bundle/trunk/repository/
3) It found the Guava: Google Core Libraries for Java 1.5 Runtime and SDK, so I clicked ok to each message and they seemed to install fine.
Now I want to use it in my code (for an Android app) I am trying to add an import to one of my class files
import com.google.common.collect.MapMaker;
我得到一个编译错误信息
I get a compile error message
进口com.google不能 解决
The import com.google cannot be resolved
时有什么特别的一步,我需要的库添加到我的项目来执行?
我一直在寻找通过项目属性,我有我需要添加一个条目感觉的 Java构建路径>库的,但我不知道该怎么补充。
Is there any special step I need to perform in order add the library to my project?
I have been looking through the project properties, I've got a feeling I need to add an entry to Java Build Path > Libraries but I do not know what to add.
推荐答案
据我所知谷歌番石榴是不是一个Eclipse插件。这是一个第三方库。 要一个lib添加到Eclipse构建路径只需右键点击你的项目 - >构建路径 - >配置构建路径 - >库选项卡 - >添加外部JAR - >找到的番石榴r07.jar - > OK / OPEN
As far as i know Google Guava is not an Eclipse Plugin. It's a third party library. To add a lib to the Eclipse build path simply right click on your project -> build path -> configure build path -> libraries tab -> add external jars -> locate guava-r07.jar -> OK/OPEN
这篇关于如何添加番石榴到Eclipse项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!