问题描述
我正在Intellij Idea IDE中构建Java项目. 以下是我的build.gradle文件:
group 'fyp_group09' version '1.0-SNAPSHOT' apply plugin: 'java' sourceCompatibility = 1.5 repositories { mavenCentral() } dependencies { testCompile group: 'junit', name: 'junit', version: '4.11' compile 'log4j:log4j:1.2.17' }
我使用学校提供的代理连接,并在IDE中完成了所需的代理设置. log4j依赖项没有下载.我已经多次刷新了Gradle项目,但是它没有下载依赖项,甚至没有任何错误.我该如何解决这个问题?
推荐答案
给定的以下技巧在这里,对我来说很好:
在文件>设置> Gradle> Global Gradle设置
中未检查"离线工作"
其他推荐答案
我们有此功能,在执行文件>无效的caches/重新启动...
后工作问题描述
I am building a Java project in Intellij Idea IDE. Following is my build.gradle file:
group 'fyp_group09' version '1.0-SNAPSHOT' apply plugin: 'java' sourceCompatibility = 1.5 repositories { mavenCentral() } dependencies { testCompile group: 'junit', name: 'junit', version: '4.11' compile 'log4j:log4j:1.2.17' }
I use a proxy connection provided by school and have done the required proxy setup in the IDE. The log4j dependencies are not getting downloaded. I've refreshed the gradle project many times, but it does not download the dependencies and does not even give any error. How can I solve this problem?
推荐答案
The following trick as given here, worked well for me:
Un-check "Offline work" in File>Settings>Gradle>Global Gradle Settings
其他推荐答案
We had this, worked after doing File>Invalidate Caches / Restart...