【发布时间】:2016-05-06 09:56:54
【问题描述】:
当我在 gradle 中包含外部项目时遇到以下问题(我正在使用 Intellij IDEA)。
Could not resolve all dependencies for configuration ':build'.
> Could not find :<external-project>:.
Searched in the following locations:
file:/Users/<user>/.m2/repository//<external-project>//<external-project>-.pom
file:/Users/<user>/.m2/repository//<external-project>//<external-project>-.jar
我在 settings.gradle 中有以下行:
包括“:” project(':').projectDir = new File(rootProject.projectDir, '../')
并且 build.gradle 有:compile ':external-project'
单独两个项目都正常工作,但是当我包含外部项目时,我遇到了依赖问题。
【问题讨论】:
-
试试
compile project(':external-project') -
你是宝石,RaGe :) 谢谢,它现在可以工作了。如果您可以将此作为答案,我可以投票并关闭此线程。
标签: java intellij-idea gradle