在Eclipse中更新我的毕业生依赖关系 [英] Update my gradle dependencies in eclipse

查看:76
本文介绍了在Eclipse中更新我的毕业生依赖关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的日食中有一个简单的毕业项目。我更新build.gradle以包含几个apache http jars ...

 依赖关系{
compile group:' commons-collections',name:'commons-collections',version:'3.2'
compile'org.apache.httpcomponents:httpclient:4.2.3'
compileorg.apache.httpcomponents:httpmime: 4.2.3
testCompile group:'junit',name:'junit',version:'4. +'
}

然而,在我的代码中,我引用了一些Apache HTTP的东西,我得到:

 导入org.apache.http无法解析

有什么我需要做的任何提示Eclipse看到我的build.gradle中的新的依赖关系?



我尝试干净,但不起作用。我的毕业插件是:

  Gradle IDE 3.3.0.201307040643-RELEASE org.springsource.ide.eclipse.gradle.feature.feature。组GoPivotal,Inc. 


解决方案

您必须选择刷新在资源管理器中右键单击项目时出现的Gradle上下文菜单中的依赖关系。


I have a simple gradle project in my eclipse. I update the build.gradle to include a few apache http jars...

dependencies {
    compile group: 'commons-collections', name: 'commons-collections', version: '3.2'
    compile 'org.apache.httpcomponents:httpclient:4.2.3'
    compile "org.apache.httpcomponents:httpmime:4.2.3"
    testCompile group: 'junit', name: 'junit', version: '4.+'
}

However in my code, where I reference some Apache HTTP stuff I get:

The import org.apache.http cannot be resolved   

Any tips on what I need to do to make Eclipse see the new dependencies in my build.gradle?

I tried doing a clean but that does not work. My gradle plugin is:

  Gradle IDE    3.3.0.201307040643-RELEASE  org.springsource.ide.eclipse.gradle.feature.feature.group   GoPivotal, Inc.

解决方案

You have to select "Refresh Dependencies" in the "Gradle" context menu that appears when you right-click the project in the Package Explorer.

这篇关于在Eclipse中更新我的毕业生依赖关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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