首页 > 其他分享> > Could not find method compile() for arguments on object of type org.gradle.api.internal.artifacts.
Could not find method compile() for arguments on object of type org.gradle.api.internal.artifacts.
作者:互联网
在command line执行命令
gradle clean bootJar --no-daemon
报错
Could not find method compile() for arguments [io.micrometer:micrometer-registry-prometheus:1.5.11] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
常出现在安装了OpenJDK 16 with gradle
解决办法:
compile and testCompile configurations are removed in Gradle 7+. You can use implementation and testImplementation instead.
使用implementation 替换 compile 即可
标签:artifacts,Could,object,gradle,compile,api,internal,find 来源: https://blog.csdn.net/evane1890/article/details/120423800