在 Eclipse 中更新我的 gradle 依赖项 [英] Update my gradle dependencies in eclipse
问题描述
我的 Eclipse 中有一个简单的 gradle 项目.我更新了 build.gradle 以包含一些 apache http jars...
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.+'
}
但是在我的代码中,我引用了一些我得到的 Apache HTTP 内容:
However in my code, where I reference some Apache HTTP stuff I get:
The import org.apache.http cannot be resolved
关于我需要做什么才能让 Eclipse 在我的 build.gradle 中看到新依赖项的任何提示?
Any tips on what I need to do to make Eclipse see the new dependencies in my build.gradle?
我尝试过清理,但没有用.我的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.
推荐答案
您必须在 Package Explorer 中右键单击项目时出现的Gradle"上下文菜单中选择Refresh Dependencies".
You have to select "Refresh Dependencies" in the "Gradle" context menu that appears when you right-click the project in the Package Explorer.
这篇关于在 Eclipse 中更新我的 gradle 依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!