我写了一个gradle构建文件
compile group: 'org.apache.commons', name: 'commons-lang', version: '3:3.0'
这给出了一个错误
Could not find org.apache.commons:commons-lang:3:3.0.
Searched in the following locations:
https://repo1.maven.org/maven2/org/apache/commons/commons-lang/3:3.0/commons-lang-3:3.0.pom
https://repo1.maven.org/maven2/org/apache/commons/commons-lang/3:3.0/commons-lang-3:3.0.jar
如果我将依赖线更改为
compile 'org.apache.commons:commons-lang3:3.0'
有用!
但是我的理解是这两条线应该是相同的。谁能告诉我为什么“组”,“名称”和“版本”语法不起作用...
最佳答案
你有没有尝试过:
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.0'
?
差异很小,但很关键。
关于gradle - 这两行之间的差异..,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32663803/