[英]How to change dependency in Gradle IntelliJ project?
You projects contains a file called build.gradle
which contains dependencies that look something like this: 您的项目包含一个名为
build.gradle
的文件,该文件包含如下所示的依赖项:
dependencies {
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.7'
compile group: 'org.slf4j', name: 'jul-to-slf4j', version: '1.7.7'
compile group: 'ch.qos.logback', name: 'logback-classic', '1.0.13': logbackVersion
}
You can simply change the dependencies there. 您可以在那里简单地更改依赖关系。 Afterwards Gradle will fetch the new dependencies automatically, if activated.
之后,如果激活,Gradle将自动获取新的依赖项。 If not, use the "Refresh all gradle projects" button from the "Gradle" view (shown in the screenshot)
如果不是,请使用“渐变”视图中的“刷新所有gradle项目”按钮(如屏幕截图所示)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.