Execution failed for task ':app:iterateDeclaredDependencies'.
> Could not get unknown property 'scm' for configuration container of type org.gradle.api.internal.artifacts.configurations.DefaultConfigurationContainer.
我正在使用来自的确切代码片段使用依赖项 https://docs.gradle.org/current/userguide/working_with_dependencies.html
I don't know what scm is here but autocompletion seems to suggests that all is good, no?
我正在使用的版本:
------------------------------------------------------------
Gradle 5.4.1
------------------------------------------------------------
Build time: 2019-04-26 08:14:42 UTC
Revision: 261d171646b36a6a28d5a19a69676cd098a4c19d
Kotlin: 1.3.21
Groovy: 2.5.4
Ant: Apache Ant(TM) version 1.9.13 compiled on July 10 2018
JVM: 1.8.0_191 (Oracle Corporation 25.191-b12)
OS: Mac OS X 10.14.6 x86_64
要查询特定的依赖集,必须首先声明它们。scm
不存在,因此 Gradle 失败并显示错误消息。可以像这样添加其他依赖项集:
configurations {
scm
}
(定义自定义配置 https://docs.gradle.org/current/userguide/managing_dependency_configurations.html#defining_custom_configurations)
例如,尝试使用默认值之一implementation
.
我不是 IntelliJ IDEA 用户,因此无法确切说明为什么自动补全在这种情况下起作用。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)