这里是我们的代码:
dependencies {
implementation project(path: ':openCVLibrary3')
implementation project(path: ':DogeCV')
}
apply from: '../build.common.gradle'
导致错误:
ERROR: Could not find method implementation() for arguments [DefaultProjectDependency{dependencyProject='project ':openCVLibrary3'', configuration='default'}] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
谢谢!
implementation
配置也由java
插件创建。因此,您将必须应用该插件才能使用该配置。如果要从build.common.gradle
构建文件中应用插件,请将引用该插件的行移到依赖关系块上方,以便在尝试使用插件提供的功能之前先应用插件。
如果您已经在执行此操作,则在使用旧版本的Gradle时可能也会发生。确保您使用的是Gradle 3.4或更高版本(或必须使用compile
代替。)>